[llvm-branch-commits] [clang] [llvm] [DirectX] Validate if Textures/TypedBuffers are being bound in Root Signatures (PR #147573)
Finn Plummer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 22 09:37:10 PDT 2025
================
@@ -261,10 +300,22 @@ getRootSignature(RootSignatureBindingInfo &RSBI,
}
static void reportInvalidHandleTy(
- Module &M,
+ Module &M, const llvm::ArrayRef<dxil::ResourceInfo::ResourceBinding> &RDs,
const iterator_range<SmallVectorImpl<dxil::ResourceInfo>::iterator>
&Resources) {
for (auto Res = Resources.begin(), End = Resources.end(); Res != End; Res++) {
+ llvm::dxil::ResourceInfo::ResourceBinding Binding = Res->getBinding();
+ bool IsBound = false;
+ for (const auto &RD : RDs) {
+ if (Binding.overlapsWith(RD)) {
----------------
inbelic wrote:
nit: you could probably move the error reporting to be inside this if statement and then you don't need the `IsBound` and `continue`
https://github.com/llvm/llvm-project/pull/147573
More information about the llvm-branch-commits
mailing list