[llvm] [DirectX] Adding support for Root Descriptors in obj2yaml/yaml2obj (PR #137259)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu May 8 13:48:02 PDT 2025


================
@@ -580,7 +585,28 @@ struct ProgramSignatureElement {
 
 static_assert(sizeof(ProgramSignatureElement) == 32,
               "ProgramSignatureElement is misaligned");
+namespace RST0 {
+namespace v0 {
----------------
bogner wrote:

I disagree that changing this name would make this inconsistent. The other `vX` namespaces in this file (ie, the `PSV0` ones) correspond exactly to the version of the structure. Consider PSVRuntimeInfo::getVersion in DXContainer.h:
```c++
  uint32_t getVersion() const {
    return Size >= sizeof(dxbc::PSV::v3::RuntimeInfo)
               ? 3
               : (Size >= sizeof(dxbc::PSV::v2::RuntimeInfo)     ? 2
                  : (Size >= sizeof(dxbc::PSV::v1::RuntimeInfo)) ? 1
                                                                 : 0);
  }
```

Using namespaces called `v0` and `v1` to represent versions 1 and 2 respectively is just confusing and we shouldn't do it.

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


More information about the llvm-commits mailing list