[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
Thu Jul 17 11:16:08 PDT 2025


================
@@ -249,6 +260,20 @@ getRootSignature(RootSignatureBindingInfo &RSBI,
   return RootSigDesc;
 }
 
+static void reportInvalidHandleTy(
+    Module &M,
+    const iterator_range<SmallVectorImpl<dxil::ResourceInfo>::iterator>
+        &Resources) {
+  for (auto Res = Resources.begin(), End = Resources.end(); Res != End; Res++) {
+    TargetExtType *Handle = Res->getHandleTy();
+    auto *TypedBuffer = dyn_cast_or_null<TypedBufferExtType>(Handle);
+    auto *Texture = dyn_cast_or_null<TextureExtType>(Handle);
+
----------------
inbelic wrote:

IIUC, the check needs to be more nuanced then just rejecting any `TypedBuffer` or `Texture` type. Or is this just because they aren't supported yet?

It should be checking that the texture/typed buffer is not bound to a root descriptor. See here: https://godbolt.org/z/YcnsqfMd3

https://github.com/llvm/llvm-project/pull/147573


More information about the llvm-branch-commits mailing list