[llvm-branch-commits] [llvm] [DirectX] Adding support for Root Descriptor in Obj2yaml/Yaml2Obj (PR #136732)

Finn Plummer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 23 14:24:43 PDT 2025


================
@@ -594,6 +599,25 @@ struct RootConstants {
     sys::swapByteOrder(Num32BitValues);
   }
 };
+struct RootDescriptor_V1_0 {
----------------
inbelic wrote:

Having poked a bit more in `DXContainer.h`, maybe it would be best to follow how it is done for `RuntimeInfo`? Defining a new namespace for each version and then having all later version inheret from the previous version. So something like:
```
namespace v0 {
struct RootDescriptor {
  uint32_t ShaderRegister;
  uint32_t RegisterSpace;
  
  void swapbytes() {...}
};
}

namespace v1 {
struct RootDescriptor : public v0::RootDescriptor {
  uint32_t Flags;
  void swapbytes() {...}
};
}
```

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


More information about the llvm-branch-commits mailing list