[llvm] [DirectX] adding support to read/write descriptor table data using obj2yaml/yaml2obj (PR #138315)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 09:48:53 PDT 2025


================
@@ -228,6 +273,19 @@ class RootSignature {
       else
         DataSize = sizeof(dxbc::RTS0::v2::RootDescriptor);
       break;
+    case dxbc::RootParameterType::DescriptorTable:
+      uint32_t NumRanges =
+          support::endian::read<uint32_t, llvm::endianness::little>(
+              PartData.begin() + Header.ParameterOffset);
+      if (Version == 1)
+        DataSize = sizeof(dxbc::RTS0::v1::DescriptorRange) * NumRanges;
+      else
+        DataSize = sizeof(dxbc::RTS0::v2::DescriptorRange) * NumRanges;
+
+      // 4 bits for the number of ranges in table and
+      // 4 bits for the ranges offset
----------------
bogner wrote:

Do you mean bytes here, rather than bits?

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


More information about the llvm-commits mailing list