- Adding support for bindless resources/samplers. The loose resources have to be wrapped in a macro that generates an index and proxy resource when bindless is enabled. Reflection has to parse these differently from other resources since they're parsed as uint parameters. The runtime also has to bind these differently since they end up needing to find their real resource in the binding data and then update a constant buffer.
- To assist in conversions, the shader compiler will detect if a shader is compiled with both bindless and non-bindless resources/samplers and will emit errors if that is the case.
- Adding support for bindless Uniform Buffer resources/samplers. Because Uniform Buffers aren't per-shader, they'll always update their constants with the bindless indices of their resources.
- Adding more flags to FShaderCodePackedResourceCounts required changing all the array initializations to individual parameters since not all the new flags are used everywhere.
- No shaders have been configured to support bindless resources/samplers. Yet.
#jira UE-139616
#rb zach.bethel, arciel.rekman
#preflight 6282b8ec44349a6581a21a39
[CL 20250348 by christopher waters in ue5-main branch]
- This fixes an issue where all SM6 compiles were reporting 0 instructions.
#rb christopher.waters
#jira FORT-468097
#preflight none
[CL 19742347 by Jason Nadro in ue5-main branch]
- SM6.6 not enabled just yet.
- Adding our own defines of __SHADER_TARGET_MAJOR and __SHADER_TARGET_MINOR to mimic the DXC defines. Since we preprocess, we can't rely on DXC to define them for us.
- Adding support for 64bit atomic operations
- Changing part of Nanite PC atomic permutation selection to be based on DataDrivenPlatformInfo
- Fixing DXC shader debugging. The PDB section was still being stripped from the final DXIL.
#jira none
#rb rune.stubbe
#preflight 61548928f5e4fd0001d7d0b3
#ROBOMERGE-OWNER: christopher.waters
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 17665881 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE-CONFLICT from-shelf
[CL 17665943 by christopher waters in ue5-release-engine-test branch]
- Removed some unnecessary code from D3D shader compilers.
- Removing shader VendorExtensions runtime data from platforms that don't need them.
- Turning FShaderCodeFeatures into a set of flags to reduce its size. Adding a few new flags for future use.
- Moved the common D3D12 shader data and creation code into shared locations to cut down on code duplication.
- Removed the unnecessary copying of header data from all D3D12 shader types.
- Removed FD3D12ShaderBytecode since its values can be inferred from other shader data.
#jira none
#rb rolando.caloca, arciel.rekman
#preflight 6140c2df3aa82d000149f13b
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 17509617 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)
[CL 17509631 by christopher waters in ue5-release-engine-test branch]
- Splitting symbol generation and shader "debug info" generation into two different cvars. This should now allow us to generate symbols post-packaging without generating different shader variants. This should also enable us to always generate symbols and still have the final deduplicated shader sizes.
- r.Shaders.Symbols is now the primary way to enable shader symbols for debugging.
- r.Shaders.GenerateSymbols can be enabled to always generate symbols without writing them to disk.
- r.Shaders.WriteSymbols can be used to force write symbols if they were previously generated.
- r.Shaders.ExtraData can be used to generate shader names for engine runtime systems to use.
- NotifyShaderCooked replaced with NotifyShaderCompiled, prep for upcoming non-cook symbol writing.
- PC DXC shader compiles should only generate debug info when requested, not all the time.
- PC FXC shader compiles should generate debug info when requested, not just when r.Shaders.Optimize is 0.
#jira none
#rb arciel.rekman, lukas.hermanns
#preflight 611ad9035e737200015992db
#ROBOMERGE-SOURCE: CL 17186155 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)
[CL 17186162 by christopher waters in ue5-release-engine-test branch]
Example usage in a shader:
PLATFORM_ASSERT4(GroupThread > 4321, 0xDF7DC903, GroupThread, GroupIndex, GroupBase, asuint(123.456f));
Example GPU crash report output:
LogD3D12RHI: Error: [GPUBreadCrumb] Last tracked GPU operations:
LogD3D12RHI: Error: [GPUBreadCrumb] 3D Queue 0 - Begin: Frame 348 - Scene - ReflectionIndirect - RayTracingReflections - RayTracingDeferredReflectionsShade 957x466
LogD3D12RHI: Error: [GPUBreadCrumb] Shader assertion failed! ID: 0xDF7DC903
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [int32]: 416 42 172032 1123477881
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [uint32]: 416 42 172032 1123477881
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [hex]: 0x000001A0 0x0000002A 0x0002A000 0x42F6E979
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [float]: 0.000000 0.000000 0.000000 123.456001
This works through automatic diagnostic buffer binding in D3D12 RHI, which becomes available in *any* shader as a UAV.
Opens the door for arbitrary human-readable message output from any shader in the future.
PLATFORM_ASSERT macro is always enabled and available on supported platforms. It is intended to be a low-level mechanism for a higher-level check() that would be controlled via CVars.
#rb Christopher.Waters
[CL 16167404 by Yuriy ODonnell in ue5-main branch]
Disabled by default (guarded by USE_SHADER_MODEL_6_6).
Includes work done by Yuriy.
#rb yuriy.odonnell
#fyi brian.karis, christopher.waters, lukas.hermanns
[CL 15914077 by graham wihlidal in ue5-main branch]
- Removed OutputMask since nothing was using it anymore.
- Made UAVMask an optional output from FXC compiles, only d3d11 reads it.
- UAVMask now created from entire set of UAVs and not just UAVs in Uniform Buffers.
#jira none
#rb mihnea.balta
#ROBOMERGE-SOURCE: CL 15643920 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v779-15635321)
[CL 15643927 by christopher waters in ue5-main branch]