[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 10:14:49 PDT 2025
================
@@ -271,15 +237,29 @@ static void reportErrors(Module &M, DXILResourceMap &DRM,
if (auto RSD = getRootSignature(RSBI, MMI)) {
- llvm::hlsl::rootsig::RootSignatureBindingValidation Validation =
- initRSBindingValidation(*RSD, tripleToVisibility(MMI.ShaderProfile));
-
- reportUnboundRegisters(M, Validation, ResourceClass::CBuffer,
- DRM.cbuffers());
- reportUnboundRegisters(M, Validation, ResourceClass::UAV, DRM.uavs());
- reportUnboundRegisters(M, Validation, ResourceClass::Sampler,
- DRM.samplers());
- reportUnboundRegisters(M, Validation, ResourceClass::SRV, DRM.srvs());
+ hlsl::BindingInfoBuilder Builder;
+ dxbc::ShaderVisibility Visibility = tripleToVisibility(MMI.ShaderProfile);
+ trackRootSigDescBinding(Builder, *RSD, Visibility);
+
+ bool HasOverlap;
+ hlsl::BindingInfo Info = Builder.calculateBindingInfo(HasOverlap);
----------------
joaosaffran wrote:
There is another PR that takes care of checking if there are overlapping ranges. The original implementation that order made sense, now, I might need to change the PRs orders, will fix that today.
https://github.com/llvm/llvm-project/pull/146785
More information about the llvm-commits
mailing list