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

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 16:41:56 PDT 2025


================
@@ -99,6 +99,17 @@ DESCRIPTOR_RANGE_FLAG(0x10000, DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS)
 #undef DESCRIPTOR_RANGE_FLAG
 #endif // DESCRIPTOR_RANGE_FLAG
 
+// DESCRIPTOR_RANGE(value, name).
+#ifdef DESCRIPTOR_RANGE
+
+DESCRIPTOR_RANGE(0, SRV)
+DESCRIPTOR_RANGE(1, UAV)
+DESCRIPTOR_RANGE(2, CBV)
+DESCRIPTOR_RANGE(3, Sampler)
+DESCRIPTOR_RANGE(4, NONE)
----------------
joaosaffran wrote:

Here is an example use case of NONE in the frontend: https://github.com/llvm/llvm-project/blob/5f69d680e2cc94dcb30a7f29e8144725530a6da4/clang/lib/Parse/ParseHLSLRootSignature.cpp#L87.

But that discussion was in the context of flags, I will remove this one from here, since it doesn't seem to match the pattern of other NONE values

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


More information about the llvm-commits mailing list