[llvm] [DirectX] Refactor RootSignature Backend to remove `to_underlying` from Root Parameter Header (PR #154249)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 10:25:21 PDT 2025
================
@@ -171,26 +172,26 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
<< "RootParametersOffset: " << RS.RootParameterOffset << "\n"
<< "NumParameters: " << RS.ParametersContainer.size() << "\n";
for (size_t I = 0; I < RS.ParametersContainer.size(); I++) {
- const auto &[Type, Loc] =
- RS.ParametersContainer.getTypeAndLocForParameter(I);
- const dxbc::RTS0::v1::RootParameterHeader Header =
- RS.ParametersContainer.getHeader(I);
-
- OS << "- Parameter Type: " << Type << "\n"
- << " Shader Visibility: " << Header.ShaderVisibility << "\n";
-
- switch (Type) {
- case llvm::to_underlying(dxbc::RootParameterType::Constants32Bit): {
+ const auto &Info = RS.ParametersContainer.getInfo(I);
+
+ OS << "- Parameter Type: "
+ << enumToStringRef(Info.Type, dxbc::getRootParameterTypes()) << "\n"
+ << " Shader Visibility: "
+ << enumToStringRef(Info.Visibility, dxbc::getShaderVisibility())
+ << "\n";
+ const uint32_t &Loc = Info.Location;
----------------
bogner wrote:
Looks like you missed this spot when you were making the changes for https://github.com/llvm/llvm-project/pull/154249#discussion_r2285984936
https://github.com/llvm/llvm-project/pull/154249
More information about the llvm-commits
mailing list