[llvm-branch-commits] [clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 28 12:53:36 PDT 2025


================
@@ -1268,11 +1268,34 @@ bool SemaHLSL::handleRootSignatureElements(
         // value
         ReportError(Loc, 1, 0xfffffffe);
       }
+      switch (Clause->Type) {
----------------
bogner wrote:

This would be simpler with a `toDescriptorRangeType()` helper (whether as a static function or even just a lambda). Also, the flags argument to `verifyDescriptorRangeFlag` looks like it's just immediately cast back to a dxbc::DescriptorRangeFlags - we should just update the signature to take the enum in the first place.
```c++
      if (!llvm::hlsl::rootsig::verifyDescriptorRangeFlag(
              Version, toDescriptorRangeType(Clause->Type), Clause->Flags))
        ReportFlagError(Loc);
```

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


More information about the llvm-branch-commits mailing list