Skip to content

Commit

Permalink
DXIL Disassembly prefix phi SSA with the block
Browse files Browse the repository at this point in the history
Highlight that the SSA value used as the phi result is captured from the block branched from, not the SSA value in the current block

i.e.
_label7:                      // preceded by _label9, _label6
  float _375 = phi float [ _label9::_404, _label9 ], [ 1.00000, _label6 ];
  float _376 = phi float [ _label9::_375, _label9 ], [ 1.00000, _label6 ];
  • Loading branch information
Zorro666 committed Nov 20, 2024
1 parent 3ea9735 commit 2daffae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions renderdoc/driver/shaders/dxil/dxil_disassemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4641,8 +4641,11 @@ void Program::MakeRDDisassemblyString(const DXBC::Reflection *reflection)
lineStr += " ";
else
lineStr += ", ";
lineStr += StringFormat::Fmt("[ %s, %s ]", GetArgId(inst, a).c_str(),
GetArgId(inst, a + 1).c_str());
rdcstr block = GetArgId(inst, a + 1);
lineStr += "[ ";
if(IsSSA(inst.args[a]))
lineStr += StringFormat::Fmt("%s::", block.c_str());
lineStr += StringFormat::Fmt("%s, %s ]", GetArgId(inst, a).c_str(), block.c_str());
}
break;
}
Expand Down

0 comments on commit 2daffae

Please sign in to comment.