Commit Graph

108 Commits

Author SHA1 Message Date
Martin Mittring
29f89a390c Integrate from Orion
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]
2015-09-25 17:34:00 -04:00
Mark Satterthwaite
7147d2be54 Text format correctness in the new ShaderCache errors.
[CL 2706229 by Mark Satterthwaite in Main branch]
2015-09-25 11:32:41 -04:00
Mark Satterthwaite
c48cc53512 And more MSVC errors not enabled on Clang...
[CL 2706220 by Mark Satterthwaite in Main branch]
2015-09-25 11:28:21 -04:00
Mark Satterthwaite
387481a070 Try to fix a different MSVC warning, which unfortunately clang doesn't allow us to enable independently.
[CL 2706191 by Mark Satterthwaite in Main branch]
2015-09-25 11:00:34 -04:00
Mark Satterthwaite
eae727894c In the shader-cache handle invalid resource references more gracefully, reporting the error and where it can be non-fatal assigning an invalid-state marker. We can't log draws while an invalid state is set so keep a count of them and ensure we only log draws with fully valid state. This should help debug cases where a resource lifetime isn't quite right without immediately crashing.
[CL 2706121 by Mark Satterthwaite in Main branch]
2015-09-25 10:18:04 -04:00
Mark Satterthwaite
c27bcab393 Fix another signed/unsigned warning that didn't appear under Clang but MSVC noticed.
[CL 2706027 by Mark Satterthwaite in Main branch]
2015-09-25 08:33:14 -04:00
Mark Satterthwaite
9ee803f916 Batched shader precompilation & predraw for Mac OS X which can be more aggressive behind loading screens & purged before entering an actual level, to reduce the time taken to reach an interactive state without hitches in the actual game.
- 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]
2015-09-25 07:55:46 -04:00
Jack Porter
ea84e81529 Rename shader platform SP_OPENGL_ES2 to SP_OPENGL_ES2_ANDROID
[CL 2705741 by Jack Porter in Main branch]
2015-09-24 23:37:30 -04:00
Uriel Doyon
8b7a972f28 New options to enable selective outputs in the base pass for opaque geometry.
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]
2015-09-23 12:52:42 -04:00
John Abercrombie
e881c0491c Merging using UE4-Fortnite-To-UE4 @ CL 2685327
[CL 2693429 by John Abercrombie in Main branch]
2015-09-16 10:22:45 -04:00
Mark Satterthwaite
e824b4c3c0 Merging changes necessary to support layered rendering on platforms where layer specification is done in vertex shader as geometry shaders don't exist.
reviewedby michael.trepka, rolando.caloca, marcus.wassmer, lee.clark

[CL 2672079 by Mark Satterthwaite in Main branch]
2015-08-28 05:31:26 -04:00
Mark Satterthwaite
a4107b4efe Merge changes to the ShaderCache from Zebra to extend support to Mac Metal.
reviewedby michael.trepka

[CL 2670886 by Mark Satterthwaite in Main branch]
2015-08-27 10:25:39 -04:00
Rolando Caloca
06df4c61a8 UE4 - Fix minor inconsistencies on shader api
[CL 2640303 by Rolando Caloca in Main branch]
2015-07-31 10:33:31 -04:00
John Barrett
aa0f63bd8f Updated use of deprecated linked list method.
[CL 2629055 by John Barrett in Main branch]
2015-07-22 12:11:55 -04:00
Jeff Campeau
b148058460 Provide default implementations for members so that the base type isn't abstract and can be used in arrays. (VS2015)
[CL 2622282 by Jeff Campeau in Main branch]
2015-07-15 15:53:03 -04:00
Martin Mittring
6f0237bc2a minor optimizations
[CL 2609953 by Martin Mittring in Main branch]
2015-07-02 19:28:56 -04:00
Rolando Caloca
daef6ebed2 UE4 - hlslcc - Common header reader
[CL 2609224 by Rolando Caloca in Main branch]
2015-07-02 11:52:03 -04:00
Marcus Wassmer
8a49574735 Vertex and Index buffer write locks on PS4 no longer require memcopies.
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]
2015-06-30 14:18:55 -04:00
Daniel Lamb
62c9d5a665 Fix for inconsistent crash when requesting shader recompilation via cook on the fly.
UE-16572

[CL 2579114 by Daniel Lamb in Main branch]
2015-06-05 17:58:38 -04:00
Robert Manuszewski
e274d53736 [INTEGRATE] Change 2527228 by Robert.Manuszewski@Robert_Manuszewski_Raptor1 on 2015-04-27 14:09
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]
2015-05-06 04:18:05 -04:00
Bob Tellez
513d14136f [AUTOMERGE]
#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]
2015-04-29 13:42:47 -04:00
Bob Tellez
770638f7dd [AUTOMERGE]
#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]
2015-04-27 12:42:48 -04:00
Bob Tellez
63d256d14c [AUTOMERGE]
#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]
2015-04-27 12:42:32 -04:00
Mark Satterthwaite
30a1d8bd53 Correct incomplete sentence in FShaderCache comment.
[CL 2514771 by Mark Satterthwaite in Main branch]
2015-04-16 15:09:16 -04:00
Mark Satterthwaite
2e96d8bc09 More explanatory code documentation for FShaderCache.
#codereview michael.trepka

[CL 2514751 by Mark Satterthwaite in Main branch]
2015-04-16 15:01:56 -04:00