CL 2704794 2704931 2704948 2704962 2705238 2706353 2700643 2705458
Uniform Buffer layout name
and
more debug info for this and other bugs: OR-7159 CRASH: Client crashed at start of match in D3D11Commands.cpp
Adding OptionalData (key value pairs) to the shaders (to put shader name into the shader code for better debugging), affects all RHI, invalidate DDC key for all shaders, cleanup existing code (was adding 0/1/5 bytes and had to compensate in many areas)
OptionalData:
key is a char, value is up to 255 bytes, up to 64K in total
#platformnotify Josh.Adams
[CL 2706923 by Martin Mittring in Main branch]
- With 'r.UseAsyncShaderPrecompilation' enabled shader precompilation is now executed on the render thread alongside the predraw, not as a single operation on loading the binary cache.
- The setting 'r.TargetPrecompileFrameTime' controls what the target frame rate should be when performing async. precompile and the shader cache will try and adjust how many shaders to precompile to stay within this limit, with a minimum of 1 shader per frame.
- The shader cache is now updated during initial loading to take advantage of the time spent loading essential data to do as much of the precompile as possible.
- It is possible to accelerate the shader cache's precompilation by specifying 'r.AccelPredrawBatchTime' and 'r.AccelTargetPrecompileFrameTime' to larger values, then calling FShaderCache::BeginAcceleratedBatching() to start using the more aggressive values and FShaderCache::EndAcceleratedBatching() to go back to the normal values.
- Calling FShaderCache::FlushOutstandingBatches() will force completion of all outstanding batched precompilation and predraws during the next frame.
[CL 2706016 by Mark Satterthwaite in Main branch]
Optionnal outputs are : CustomData, PreshadowFactors and Velocity (when enabled)
Controlled by ini file variable : r.SelectiveBasePassOutputs=true
#code_review: Brian.Karis
[CL 2702718 by Uriel Doyon in Main branch]
RHi now provides CreateAndLock functions for Vertex and Index buffers which are more efficient on certain platforms.
Use r.PS4StandardWriteLocks=1 to enable the old default functionality for testing if necessary.
#codereview Gil.Grib,Lee.Clark
[CL 2606146 by Marcus Wassmer in Main branch]
Fix for FShader crash while streaming a level.
- Made FShader ref counting more thread safe
- Added extra locks when unregistering the shader so that released shaders can't be found in the shader id map while a shader is being released
- Made sure FShaderType::FindShaderById adds a reference to existing shaders while serializaing inline shader maps.
[INTEGRATE] Change 2532254 by Robert.Manuszewski@Robert_Manuszewski_Raptor1 on 2015-04-30 14:18
Better fix for crashes when streaming. Making FShader AND FShaderResource handling thread safe
[CL 2538774 by Robert Manuszewski in Main branch]
#UE4 Added a Canary for FShaderResource that mimics the behavior of the one in FShader to help track down the cause of https://jira.ol.epicgames.net/browse/UE-14017
--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2529461 by Bob.Tellez on 2015/04/28 19:38:07.
[CL 2530497 by Bob Tellez in Main branch]
#UE4 Added an extra canary check
--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2527111 by Bob.Tellez on 2015/04/27 12:42:15.
[CL 2527113 by Bob Tellez in Main branch]
#UE4 Added ShaderMagic_CleaningUp to the Canary checks in FShader. This will help track down the cause of UE-14017
--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2524950 by Bob.Tellez on 2015/04/24 16:48:53.
[CL 2527112 by Bob Tellez in Main branch]