Mesa (master): radeonsi: don't check for redundant and NULL states in si_emit_all_states

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 30 20:59:51 UTC 2021


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Jan  9 08:12:38 2021 -0500

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 <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794>

---

 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 3d0043e5648..3324344e500 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;



More information about the mesa-commit mailing list