mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxbc] Emit new block only after emitting switch instruction
Otherwise emitting the OpSwitch will reset the block ID, which is not desireable. Fixes #2975.
This commit is contained in:
parent
f8bd19f210
commit
ab622760a0
1 changed files with 3 additions and 1 deletions
|
@ -4009,7 +4009,6 @@ namespace dxvk {
|
||||||
|
|
||||||
// Close the current 'case' block
|
// Close the current 'case' block
|
||||||
m_module.opBranch(block.b_switch.labelBreak);
|
m_module.opBranch(block.b_switch.labelBreak);
|
||||||
m_module.opLabel (block.b_switch.labelBreak);
|
|
||||||
|
|
||||||
// Insert the 'switch' statement. For that, we need to
|
// Insert the 'switch' statement. For that, we need to
|
||||||
// gather all the literal-label pairs for the construct.
|
// gather all the literal-label pairs for the construct.
|
||||||
|
@ -4036,6 +4035,9 @@ namespace dxvk {
|
||||||
|
|
||||||
while (caseLabel != nullptr)
|
while (caseLabel != nullptr)
|
||||||
delete std::exchange(caseLabel, caseLabel->next);
|
delete std::exchange(caseLabel, caseLabel->next);
|
||||||
|
|
||||||
|
// Begin new block after switch blocks
|
||||||
|
m_module.opLabel(block.b_switch.labelBreak);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue