From bcd85a74e8ddb5b15bd474b8298bc1eef93cd09e Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Wed, 6 Jul 2022 21:24:40 +1200 Subject: [PATCH] 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: 5067a26f443 ("pan/bi: Use flow control lowering on Valhall") Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/valhall/va_pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/valhall/va_pack.c b/src/panfrost/bifrost/valhall/va_pack.c index 88cf91e0d24..ab581aeaf3b 100644 --- a/src/panfrost/bifrost/valhall/va_pack.c +++ b/src/panfrost/bifrost/valhall/va_pack.c @@ -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;