================
@@ -240,18 +254,63 @@ static void validateRootSignature(Module &M,
const auto *ParamInfo =
static_cast<const mcdxbc::RootParameterInfo *>(Reg->Cookie);
- if (RC != ResourceClass::SRV && RC != ResourceClass::UAV)
+ if (RC != ResourceClass::SRV && RC != ResourceClass::UAV) {
+ HasBindings = true;
continue;
+ }
- if (ParamInfo->Type == dxbc::RootParameterType::DescriptorTable)
+ if (ParamInfo->Type == dxbc::RootParameterType::DescriptorTable) {
+ HasBindings = true;
continue;
+ }
- if (RK != ResourceKind::RawBuffer && RK !=
ResourceKind::StructuredBuffer)
+ if (RK != ResourceKind::RawBuffer &&
+ RK != ResourceKind::StructuredBuffer) {
reportInvalidHandleTyError(M, RC, Binding);
+ continue;
+ }
+ HasBindings = true;
+
} else {
reportRegNotBound(M, RC, Binding);
}
}
+
+ if (HasBindings && MMI.ShaderProfile != Triple::Compute) {
+ dxbc::RootFlags Flags = dxbc::RootFlags(RSD.Flags);
----------------
inbelic wrote:
nit: it may be nicer if we define a separate function like
`getEnvironmentDenyFlag` and then just invoked
`reportIfDeniedShaderStageAccess` once. Might prevent a copy of this switch
table appearing elsewhere
https://github.com/llvm/llvm-project/pull/153287
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits