Skip to content

Commit

Permalink
DXIL Debugger save previous block, Phi Variables for Operation::Switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Dec 10, 2024
1 parent 24faca1 commit 9e0e25a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions renderdoc/driver/shaders/dxil/dxil_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4038,6 +4038,16 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
}
case Operation::Switch:
{
m_PreviousBlock = m_Block;
m_PhiVariables.clear();
auto it = m_FunctionInfo->phiReferencedIdsPerBlock.find(m_PreviousBlock);
if(it != m_FunctionInfo->phiReferencedIdsPerBlock.end())
{
const ReferencedIds &phiIds = it->second;
for(Id id : phiIds)
m_PhiVariables[id] = m_Variables[id];
}

// Value, Default_Label then Pairs of { targetValue, label }
ShaderVariable val;
RDCASSERT(GetShaderVariable(inst.args[0], opCode, dxOpCode, val));
Expand Down

0 comments on commit 9e0e25a

Please sign in to comment.