[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:59:57 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:
Ah right, okay then this LGTM
https://github.com/llvm/llvm-project/pull/137259
More information about the llvm-commits
mailing list