mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 01:40:14 +01:00
nir/nir: Fix a bug in move_successors
The unlink_blocks function moves successors around to make sure that, if there is a remaining successor, it is in the first successors slot and not the second. To fix this, we simply get both successors up front. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
2bd5a24a5e
commit
dc4e660dfa
1 changed files with 2 additions and 1 deletions
|
|
@ -739,10 +739,11 @@ static void
|
|||
move_successors(nir_block *source, nir_block *dest)
|
||||
{
|
||||
nir_block *succ1 = source->successors[0];
|
||||
nir_block *succ2 = source->successors[1];
|
||||
|
||||
if (succ1)
|
||||
unlink_blocks(source, succ1);
|
||||
|
||||
nir_block *succ2 = source->successors[1];
|
||||
if (succ2)
|
||||
unlink_blocks(source, succ2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue