pan/va: Use the _safe iterator when adding blend shader calls

Otherwise the list 'next' changing will cause the assertion in
list_for_each_entry to be hit.

This was not hit before because list_assert is defined for debug
builds but not debugoptimized.

Fixes: 5067a26f44 ("pan/bi: Use flow control lowering on Valhall")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17371>
This commit is contained in:
Icecream95 2022-07-06 21:24:40 +12:00 committed by Marge Bot
parent dc37ad2a73
commit bcd85a74e8

View file

@ -881,7 +881,7 @@ va_lower_blend(bi_context *ctx)
/* Program counter for *next* instruction */
bi_index pc = bi_fau(BIR_FAU_PROGRAM_COUNTER, false);
bi_foreach_instr_global(ctx, I) {
bi_foreach_instr_global_safe(ctx, I) {
if (I->op != BI_OPCODE_BLEND)
continue;