Serialize the payload size as part of the raytracing shader so it can be examined in the RHI layer.
Validate that the RTPSO is configured with the appropriate payload size.
Add macros to ensure the payloads have the expected size
Ensure that all raytracing pipelines explicitly bind a miss shader
Add a shared shader header to implement static asserts for those shader compilers that support them (like dxc).
Fix payload type on main deferred reflection raygen shader
Fix incorrect raygen shader included in the deferred RTPSO list for RTGI
Don't add builtin shaders to the RTPSO from the RHI layer as these are unlikely to ever match the required payload type
Add new method to register payload types so that plugins can more easily describe custom payloads they may be using (up to a maximum of 32 unique payload types since we use a bitmask to represent payload sets).
#rb Yuriy.ODonnell
#jira UE-157946
#preflight 636aff4363037c102679f13a
#preflight 63869dde170bc34a93e8c90e
[CL 23337139 by chris kulla in ue5-main branch]
- No longer necessary, since they were only used to find/create root signatures, which can be implemented directly in the adapter class.
- RHICreateBoundShaderState is never called.
Remove D3D12_SUPPORTS_PARALLEL_RHI_EXECUTE
- This is always true.
#rb Chris.Waters
#preflight 6384cd3afa053c489af10129
[CL 23300192 by luke thatcher in ue5-main branch]
Bumping D3D_SM5 and D3D_SM6 versions.
#jira none
#rb jason.nadro
#preflight 6384f5d2170bc34a935c960c
[CL 23298219 by christopher waters in ue5-main branch]
- All platforms were extending FBaseShaderResourceTable to add a TArray<uint32> TextureMap member, along with copies of the same RHI code to bind these resources.
- Moved the TextureMap member into the base shader table type, and removed all platform versions. They are all serializer-compatible with the original code, so no shader DDC keys need to be bumped.
- Also moved the "ResourceTable" array of RHI resources into the base FRHIUniformBuffer class.
- Added a SetResourcesFromTables function in RHICoreShader.h
Removed GetD3D11TextureFromRHITexture in D3D11RHI, replaced with a ResourceCast.
- The ResourceCast function for FRHITexture types now always follows the texture reference pointer via the vtable call, like other platforms.
#jira none
#rb Chris.Waters
#preflight 637e6cd43377450900f10fd2
[CL 23252815 by Luke Thatcher in ue5-main branch]
Every shader now has the ability to declare which payload it uses. HitGroup, Miss and Callable shaders may only specify a single type, whereas Raygen shaders may provide more than one.
The global raytracing shader libraries have been categorized according to their payload type, which helps facilitate the creation of minimal ray-tracing pipelines.
Avoid adding callable shaders to the RTPSO if they are not being used.
All RHI shader compilers and shader loaders that support ray tracing have been modified to track an extra uint representing the payload type flagged in the source (at time of compilation).
Add the RayTracingPayloadType to the shadermap DDC key so that we can properly detect when a shader's payload type is invalidated. This is required because we serialize the payload type into the shaders from the C++ side.
#rb Yuriy.ODonnell
#jira none
#preflight 635715cae6096564af4dd28e
[CL 22742893 by chris kulla in ue5-main branch]
Not proud over the LC_* files but don't dare touching the actual log macros since that is hard to get right and I don't know how to test this code
#preflight 6351d6de777a77c440123e2c
#rb none
[CL 22705170 by henrik karlsson in ue5-main branch]
- each platform compilation request is now wrapped in __try/__except rather than a single exception handling block at the top level of the worker; this allows us to log an exception (with callstack) as a compilation error and continue the batch
- remove SEH code from ShaderConductorContext, the above makes this redundant (and it didn't provide any actionable information)
- strip down SEH code in D3DShaderCompiler; now only used for the purposes of pre-compiling with DXC in the case of an FXC crash. dumping preprocessed source will be handled in a different manner in a forthcoming CL
- minor change in the DXC precompile path to not log an unnecessary warning when performing an explicitly-requested DXC precompile
#rb Jason.Nadro
#rb Laura.Hermanns
#rb Yuriy.ODonnell
#preflight 63514c798176062ea73acb41
#jira FORT-524383
[CL 22654436 by dan elksnitis in ue5-main branch]
- Making ConstantBufferType a constructor only argument. This removes the duplicated logic of calling ShouldUseStableConstantBuffer.
- Moving ShouldUseStableConstantBuffer to ShaderCompilerCommon.
- Made UE::ShaderCompilerCommon::ParseParameterType array arguments const
#jira UE-166341
#rb Guillaume.Abadie
#preflight 634eeceea1527f6b3bda9ff0
[CL 22608320 by christopher waters in ue5-main branch]
When filling out D3D12_FUNCTION_DESC, DXC does not populate RequiredFeatureFlags. Given we rely on these flags to validate bindless support at runtime, we need to emulate these flags being set.
#jira UE-162014
#rb elizabeth.baumel
#preflight 634488a6c272487ed4784593
[CL 22458354 by christopher waters in ue5-main branch]