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]
This commit is contained in:
christopher waters
2022-10-11 11:06:47 -04:00
parent 893d45994b
commit 1b8ad85eaa
@@ -776,6 +776,19 @@ bool CompileAndProcessD3DShaderDXC(FString& PreprocessedShaderSource,
}
}
// @todo - working around DXC issue https://github.com/microsoft/DirectXShaderCompiler/issues/4715
if (LibraryDesc.FunctionCount > 0)
{
if (Input.Environment.CompilerFlags.Contains(CFLAG_BindlessResources))
{
ShaderRequiresFlags |= D3D_SHADER_REQUIRES_RESOURCE_DESCRIPTOR_HEAP_INDEXING;
}
if (Input.Environment.CompilerFlags.Contains(CFLAG_BindlessSamplers))
{
ShaderRequiresFlags |= D3D_SHADER_REQUIRES_SAMPLER_DESCRIPTOR_HEAP_INDEXING;
}
}
if (NumFoundEntryPoints == MangledEntryPoints.Num())
{
Output.bSucceeded = true;