From a02dd17cb36efe9bc2ff2d675357988ded914a02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 28 Feb 2022 15:37:48 -0500 Subject: [PATCH] radeonsi: fix an assertion failure with register shadowing The problem is that dirty_states must be 0 for any state that is NULL in "queued". This code was flagging dirty_states for such states because it was only looking at "emitted". It should have been looking at "queued". Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pm4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c index 5c200b3..6f671a9 100644 --- a/src/gallium/drivers/radeonsi/si_pm4.c +++ b/src/gallium/drivers/radeonsi/si_pm4.c @@ -159,7 +159,7 @@ void si_pm4_reset_emitted(struct si_context *sctx, bool first_cs) * added to the buffer list on the next draw call. */ for (unsigned i = 0; i < SI_NUM_STATES; i++) { - struct si_pm4_state *state = sctx->emitted.array[i]; + struct si_pm4_state *state = sctx->queued.array[i]; if (state && state->is_shader) { sctx->emitted.array[i] = NULL; -- 2.7.4