[llvm] [DXIL] Adding support to RootSignatureFlags in obj2yaml (PR #122396)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 07:26:00 PST 2025


================
@@ -188,6 +192,12 @@ void MappingTraits<DXContainerYAML::Signature>::mapping(
   IO.mapRequired("Parameters", S.Parameters);
 }
 
+void MappingTraits<DXContainerYAML::RootSignatureDesc>::mapping(
+    IO &IO, DXContainerYAML::RootSignatureDesc &S) {
+  IO.mapRequired("Version", S.Version);
+  IO.mapRequired("Flags", S.Flags);
----------------
llvm-beanz wrote:

You might look at how we did the `ShaderFeatureFlags`. That approach makes the flags print nicer and more human readable in the YAML output.

In going that route the one thing I would probably do differently is making each flag "optional" rather than required in the yaml with a default value as false. That will make the printing more concise.

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


More information about the llvm-commits mailing list