Fix matching ifs to endifs on d3d11 shader debugging

This commit is contained in:
baldurk
2015-07-10 23:55:32 +02:00
parent 4b0c1cbde8
commit ac55f93ff6
+2 -1
View File
@@ -4219,7 +4219,8 @@ State State::GetNext(GlobalState &global, State quad[4]) const
{
if(s.dxbc->m_Instructions[s.nextInstruction].operation == OPCODE_IF)
depth++;
if(s.dxbc->m_Instructions[s.nextInstruction].operation == OPCODE_ELSE)
// only step out on an else if it's the matching depth to our starting if (depth == 1)
if(depth == 1 && s.dxbc->m_Instructions[s.nextInstruction].operation == OPCODE_ELSE)
depth--;
if(s.dxbc->m_Instructions[s.nextInstruction].operation == OPCODE_ENDIF)
depth--;