[llvm-branch-commits] [clang] [llvm] [DirectX] Validate if Textures/TypedBuffers are being bound in Root Signatures (PR #147573)
Joshua Batista via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 24 11:26:57 PDT 2025
================
@@ -232,6 +245,44 @@ initRSBindingValidation(const mcdxbc::RootSignatureDesc &RSD,
return Validation;
}
+static SmallVector<ResourceInfo::ResourceBinding>
+getRootDescriptorsBindingInfo(const mcdxbc::RootSignatureDesc &RSD,
+ dxbc::ShaderVisibility Visibility) {
+
+ SmallVector<ResourceInfo::ResourceBinding> RDs;
+
+ for (size_t I = 0; I < RSD.ParametersContainer.size(); I++) {
+ const auto &[Type, Loc] =
+ RSD.ParametersContainer.getTypeAndLocForParameter(I);
+
+ const auto &Header = RSD.ParametersContainer.getHeader(I);
+ if (Header.ShaderVisibility !=
+ llvm::to_underlying(dxbc::ShaderVisibility::All) &&
+ Header.ShaderVisibility != llvm::to_underlying(Visibility))
+ continue;
+
+ switch (Type) {
----------------
bob80905 wrote:
I would have thought an if condition would be more expected control flow here. Do you think this switch statement will need to possibly be extended later?
https://github.com/llvm/llvm-project/pull/147573
More information about the llvm-branch-commits
mailing list