mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +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
@ -4009,7 +4009,6 @@ namespace dxvk {
|
||||
|
||||
// Close the current 'case' block
|
||||
m_module.opBranch(block.b_switch.labelBreak);
|
||||
m_module.opLabel (block.b_switch.labelBreak);
|
||||
|
||||
// Insert the 'switch' statement. For that, we need to
|
||||
// gather all the literal-label pairs for the construct.
|
||||
@ -4036,6 +4035,9 @@ namespace dxvk {
|
||||
|
||||
while (caseLabel != nullptr)
|
||||
delete std::exchange(caseLabel, caseLabel->next);
|
||||
|
||||
// Begin new block after switch blocks
|
||||
m_module.opLabel(block.b_switch.labelBreak);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user