[llvm] [HLSL] Add descriptor table metadata parsing (PR #142492)

Alex Sepkowski via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 18:38:06 PDT 2025


================
@@ -434,8 +606,28 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
           OS << indent(Space + 2) << "Flags: " << Descriptor.Flags << "\n";
         break;
       }
+      case llvm::to_underlying(dxbc::RootParameterType::DescriptorTable): {
+        const mcdxbc::DescriptorTable &Table =
+            RS.ParametersContainer.getDescriptorTable(Loc);
+        OS << indent(Space + 2) << "NumRanges: " << Table.Ranges.size() << "\n";
----------------
alsepkow wrote:

nit: Suggest avoiding 'magic numbers' and instead use named constants. I assume the 2 is intended to be a tab? Could use 'const uint8_t TabInSpaces = 1'. 

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


More information about the llvm-commits mailing list