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

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 15:03:36 PDT 2025


================
@@ -73,24 +73,50 @@ struct ShaderHash {
   std::vector<llvm::yaml::Hex8> Digest;
 };
 
-#define ROOT_ELEMENT_FLAG(Num, Val) bool Val = false;
-
 struct RootConstantsYaml {
   uint32_t ShaderRegister;
   uint32_t RegisterSpace;
   uint32_t Num32BitValues;
 };
 
+#define ROOT_DESCRIPTOR_FLAG(Num, Val) bool Val = false;
+struct RootDescriptorYaml {
+  RootDescriptorYaml() = default;
+
+  uint32_t ShaderRegister;
+  uint32_t RegisterSpace;
+
+  uint32_t getEncodedFlags() const;
+
----------------
joaosaffran wrote:

This pattern has been copied from other structures of dxcontainer. I am not sure if this comment would add much value, because of that, and also I fell like this would be generating noise explaining something that seems to be pre established.

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


More information about the llvm-commits mailing list