[llvm] [DirectX] Adding support for Root Descriptors in obj2yaml/yaml2obj (PR #137259)
Finn Plummer via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 12:35:09 PDT 2025
================
@@ -149,6 +152,24 @@ struct RootConstantView : RootParameterView {
}
};
+struct RootDescriptorView : RootParameterView {
+ static bool classof(const RootParameterView *V) {
+ return (V->Header.ParameterType ==
+ llvm::to_underlying(dxbc::RootParameterType::CBV) ||
+ V->Header.ParameterType ==
+ llvm::to_underlying(dxbc::RootParameterType::SRV) ||
+ V->Header.ParameterType ==
+ llvm::to_underlying(dxbc::RootParameterType::UAV));
+ }
+
+ llvm::Expected<dxbc::RST0::v1::RootDescriptor> read(uint32_t Version) {
+ if (Version == 1)
----------------
inbelic wrote:
```suggestion
if (Version == 0)
```
A little concerning that this passes the testcases because IIUC this is reading the opposite version of what would be expected
https://github.com/llvm/llvm-project/pull/137259
More information about the llvm-commits
mailing list