[llvm] [DXIL] Adding support to RootSignatureFlags in obj2yaml (PR #122396)
Damyan Pepper via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 17:20:01 PST 2025
================
@@ -72,6 +73,21 @@ struct ShaderHash {
std::vector<llvm::yaml::Hex8> Digest;
};
+#define ROOT_ELEMENT_FLAG(Num, Val, Str) bool Val = false;
+struct RootSignatureDesc {
+ RootSignatureDesc() = default;
+ RootSignatureDesc(const object::DirectX::RootSignature &Data);
+
+ uint32_t getEncodedFlags();
+ uint32_t Version;
+ uint32_t NumParameters;
+ uint32_t RootParametersOffset;
+ uint32_t NumStaticSamplers;
+ uint32_t StaticSamplersOffset;
+
+#include "llvm/BinaryFormat/DXContainerConstants.def"
----------------
damyanp wrote:
```suggestion
uint32_t Version;
uint32_t NumParameters;
uint32_t RootParametersOffset;
uint32_t NumStaticSamplers;
uint32_t StaticSamplersOffset;
uint32_t getEncodedFlags();
#include "llvm/BinaryFormat/DXContainerConstants.def"
```
IMO this makes it a bit clearer what's going on and less likely to be confused that there's a `getEncodedFlags` member variable.
(also, github has messed up the diff of this suggestion and I don't know how to fix it)
https://github.com/llvm/llvm-project/pull/122396
More information about the llvm-commits
mailing list