[llvm] [DirectX] Adding support for Root Descriptors in obj2yaml/yaml2obj (PR #137259)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 12:43:47 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)
----------------
joaosaffran wrote:
I've used 1 and 2 instead of 0 and 1 to represent each version.
https://github.com/llvm/llvm-project/pull/137259
More information about the llvm-commits
mailing list