Mesa (main): pan/va: Use the _safe iterator when adding blend shader calls

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 8 01:48:58 UTC 2022


Module: Mesa
Branch: main
Commit: bcd85a74e8ddb5b15bd474b8298bc1eef93cd09e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcd85a74e8ddb5b15bd474b8298bc1eef93cd09e

Author: Icecream95 <ixn at disroot.org>
Date:   Wed Jul  6 21:24:40 2022 +1200

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 <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17371>

---

 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;
 



More information about the mesa-commit mailing list