aco/lower_branches: keep blocks with multiple logical successors
It might be the case that both the branch and exec mask write in a divergent branch block are removed. try_remove_simple_block() might then try to remove it, but fail because it has multiple logical successors. Instead, just skip these blocks. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Backport-to: 25.1 Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35202>
This commit is contained in:
@@ -553,7 +553,7 @@ lower_branches(Program* program)
|
||||
if (block.kind & block_kind_break)
|
||||
try_merge_break_with_continue(ctx, block);
|
||||
|
||||
if (block.linear_succs.size() == 1)
|
||||
if (block.linear_succs.size() == 1 && block.logical_succs.size() <= 1)
|
||||
try_remove_simple_block(ctx, block);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user