[llvm-branch-commits] [clang] [llvm] [DirectX] Validate if Textures/TypedBuffers are being bound in Root Signatures (PR #147573)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 24 12:25:59 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) {
----------------
joaosaffran wrote:
Not really, unless DirectX includes a new Root Element Type in Root Signatures, this shouldn't change
https://github.com/llvm/llvm-project/pull/147573
More information about the llvm-branch-commits
mailing list