From c28396cf20376e64ea4fb122834b0649579d530a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 9 Jan 2021 08:12:38 -0500 Subject: [PATCH] radeonsi: don't check for redundant and NULL states in si_emit_all_states All places set dirty_states correctly now. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 3d0043e..3324344 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -1530,8 +1530,8 @@ static void si_emit_all_states(struct si_context *sctx, const struct pipe_draw_i unsigned i = u_bit_scan(&mask); struct si_pm4_state *state = sctx->queued.array[i]; - if (!state || sctx->emitted.array[i] == state) - continue; + /* All places should unset dirty_states if this doesn't pass. */ + assert(state && state != sctx->emitted.array[i]); si_pm4_emit(sctx, state); sctx->emitted.array[i] = state; -- 2.7.4