[llvm-branch-commits] [llvm] [HLSL] Adding support for root descriptors in root signature metadata representation (PR #139781)
Finn Plummer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 20 11:02:43 PDT 2025
================
@@ -308,6 +413,21 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
<< "Shader Register: " << Constants->ShaderRegister << "\n";
OS << indent(Space + 2)
<< "Num 32 Bit Values: " << Constants->Num32BitValues << "\n";
+ } else if (std::holds_alternative<const dxbc::RTS0::v1::RootDescriptor *>(
+ *P)) {
+ auto *Constants = std::get<const dxbc::RTS0::v1::RootDescriptor *>(*P);
+ OS << indent(Space + 2)
+ << "Register Space: " << Constants->RegisterSpace << "\n";
+ OS << indent(Space + 2)
+ << "Shader Register: " << Constants->ShaderRegister << "\n";
+ } else if (std::holds_alternative<const dxbc::RTS0::v2::RootDescriptor *>(
+ *P)) {
+ auto *Constants = std::get<const dxbc::RTS0::v2::RootDescriptor *>(*P);
+ OS << indent(Space + 2)
+ << "Register Space: " << Constants->RegisterSpace << "\n";
+ OS << indent(Space + 2)
+ << "Shader Register: " << Constants->ShaderRegister << "\n";
+ OS << indent(Space + 2) << "Flags: " << Constants->Flags << "\n";
----------------
inbelic wrote:
This doesn't seem to be invoked in any of the test cases?
The test cases seems to only output the YAML representation
https://github.com/llvm/llvm-project/pull/139781
More information about the llvm-branch-commits
mailing list