Mesa (master): radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 17:04:10 UTC 2021


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

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

radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted

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

---

 src/gallium/drivers/radeonsi/si_pm4.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c
index 6918ae5a11f..c710a1e2e7a 100644
--- a/src/gallium/drivers/radeonsi/si_pm4.c
+++ b/src/gallium/drivers/radeonsi/si_pm4.c
@@ -142,5 +142,9 @@ void si_pm4_reset_emitted(struct si_context *sctx, bool first_cs)
    }
 
    memset(&sctx->emitted, 0, sizeof(sctx->emitted));
-   sctx->dirty_states |= u_bit_consecutive(0, SI_NUM_STATES);
+
+   for (unsigned i = 0; i < SI_NUM_STATES; i++) {
+      if (sctx->queued.array[i])
+         sctx->dirty_states |= BITFIELD_BIT(i);
+   }
 }



More information about the mesa-commit mailing list