[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:52 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);
----------------
bogner wrote:

It's a bit unfortunate that we need to read the data here in order to parse it. Do we do anything elsewhere to make sure that corrupted data doesn't bite us here? That is, does this do something reasonable for an absurdly large incorrect size or does it fall over?

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


More information about the llvm-commits mailing list