radeonsi: don't check for redundant and NULL states in si_emit_all_states
authorMarek Olšák <marek.olsak@amd.com>
Sat, 9 Jan 2021 13:12:38 +0000 (08:12 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 30 Jan 2021 20:41:23 +0000 (15:41 -0500)
All places set dirty_states correctly now.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794>

src/gallium/drivers/radeonsi/si_state_draw.cpp

index 3d0043e..3324344 100644 (file)
@@ -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;