nir: add nir_block::divergent to indicate a divergent entry condition

to be used by nir_opt_varyings

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28049>
This commit is contained in:
Marek Olšák
2024-03-09 12:59:21 -05:00
committed by Marge Bot
parent 936690f733
commit 813f37a8ed
4 changed files with 17 additions and 1 deletions

View File

@@ -889,6 +889,14 @@ visit_block(nir_block *block, struct divergence_state *state)
}
}
bool divergent = state->divergent_loop_cf ||
state->divergent_loop_continue ||
state->divergent_loop_break;
if (divergent != block->divergent) {
block->divergent = divergent;
has_changed = true;
}
return has_changed;
}