- create utility classes (serialization context objects) which allow serialization of shader code blobs independently of "shader object" (i.e. whatever type of thing we're pushing to the cache, shader job or shader map) structure
- commonize bytecode format in cache entries for shadermap and shader DDC (FShaderCodeResource struct)
- rework per-shader caching to use the serialization helpers to separate serialization of job output struct data and bytecode
- rework material and global shadermap DDC serialization to use the serialization helpers to separate serialization of shadermap structural data and bytecode
#rb Laura.Hermanns, Zousar.Shaker
#jira UE-196556
(resubmit with monolithic build fix)
[CL 36153164 by dan elksnitis in 5.5 branch]
- The new GPU profiler uses TStatIDs inside RHI breadcrumbs to assign GPU time to individual stats. As such, we need to pass the stat in the macro that generates the breadcrumb:
- 1. Whenever a SCOPED_GPU_STAT macro is used, add the stat to the matching SCOPED_DRAW_EVENT if present (or add a scope if there wasn't one), and replace with RHI_BREADCRUMB_EVENT_STAT.
- 2. Whenever a RDG_GPU_STAT_SCOPE macro is used, add the stat to the matching RDG_EVENT_SCOPE if present (or add a scope if there wasn't one), and replace with RDG_EVENT_SCOPE_STAT.
- 3. Delete any commented-out scopes.
Additional fixes:
- Moved DECLARE_GPU_STAT use inside functions to global scope. DECLARE_GPU_STAT is not meant to be used inline.
- Replace *_GAMETHREAD macros with their RHI_BREADCRUMB equivalents, which also removes the TEXT macro wrapping the format string.
- Fixed some incorrect uses of SCOPED_GPU_STAT on "GraphBuilder.RHICmdList" when only RDG passes are added, with no immediate RHICmdList work.
RDG_GPU_STAT_SCOPE and SCOPED_GPU_STAT are defined to be empty when the new GPU profiler is enabled. They have been kept to maintain backwards compatibility until we enable RHI_NEW_GPU_PROFILER permanently.
#rb zach.bethel
#jira UE-177299
[CL 35959201 by luke thatcher in ue5-main branch]
- unify shadermap serialization params into a context object
- deprecate shader code inlining into shader maps; this is no longer needed internally (and should not be used by licensees) and removing it will simplify forthcoming changes related to how shader/shadermap DDC data is structured
#rb Jason.Nadro
[CL 35701243 by dan elksnitis in ue5-main branch]
+minor rig vm graph pin default value fix & unit test
known issues:
- deformer asset soft ptr is serialized as trait pin default value, which means if the deformer asset is renamed or moved, the automaically fixup process are not triggered and no redirector is created
#jira UE-221053
#rb halfdan.ingvarsson, Helge.Mathee
[CL 35373985 by jack cai in ue5-main branch]
[ComputeFramework] Treat preprocessor issues as warnings if compile succeeded, otherwise errors, which is the standard rule.
[PCG] Adapt error summary to whatever line information is available in the error (if any).
#rb dan.elksnitis, Jeremy.Moore, Laura.Hermanns, wyatt.marvil
#rnx
[CL 35362997 by huw bowles in ue5-main branch]
[PCG] Fix line numbers for errors/warnings and add them to the error summary when available.
#rb Jeremy.Moore, wyatt.marvil
#rnx
[CL 35012896 by huw bowles in ue5-main branch]
Info is now stored in shader map in editor only data alongside platform data
Includes shader bump
#jira UE-218748
#rb dan.elksnitis
#tests local tests on Lyra cooking and DDC-Verify
[FYI] Zousar.Shaker
[CL 34906103 by tom holmes in ue5-main branch]
Readbacks are executed via FRHIGPUBufferReadback. FComputeGraphTaskWorker creates the readbacks and polls active readbacks each frame.
#rb Jeremy.Moore
[CL 34065992 by huw bowles in ue5-main branch]
- Add option for ShaderType to declare which FShaderBindingLayout needs to be used for shader gen and runtime binding
- Add helper function to generate FShaderBindingLayoutContainer from array of uniform buffers and EShaderResourceTableFlags (only supports bindless mode right now)
- Serialize the FRHIShaderBindingLayout in FShaderCompilerEnvironment so it can be used by the shader compiler backends
- FShaderBindingLayout can add required symbols to the FShaderCompilerInput which shouldn't be dead code eliminated (required for Shader resource table building)
- Serialize the hash of RHIShaderResourceTable in the platform specific shader binary data so it can be used during runtime RTPSO validation (all shaders in the RTPSO need the same RHIShaderResourceTable)
- Renamed pRootSignaure member to RootSignature (style guide)
#jira UE-212347
[CL 33624453 by kenzo terelst in ue5-main branch]
EShaderPermutationPrecacheRequest is returned to define if a permutation is required, not required or development only. Only required PSOs are precached.
DevelopmentOnly should be used for debug permutations and won't trigger an ensure when permutation is used at runtime which isn't requested for precaching.
Validation also runs in editor builds.
#rb christopher.waters
[CL 32297715 by kenzo terelst in ue5-main branch]