Mesa (staging/21.1): radeonsi: add a gfx10 bug workaround for NOT_EOP

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 5 21:08:05 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: 31643843b6549de4055a7a2565b295f5897e889d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=31643843b6549de4055a7a2565b295f5897e889d

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Thu Jun  3 13:58:08 2021 +0200

radeonsi: add a gfx10 bug workaround for NOT_EOP

This is a backport of d8fefb13228256601c3ae04331f1c05828143ed7.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4812

---

 src/gallium/drivers/radeonsi/si_state_draw.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index c54f14da805..806491b7ca4 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -1192,6 +1192,16 @@ static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw
             return;
          }
 
+         if (GFX_VERSION == GFX10) {
+            /* GFX10 has a bug that consecutive draw packets with NOT_EOP must not have
+             * count == 0 in the last draw (which doesn't set NOT_EOP).
+             *
+             * So remove all trailing draws with count == 0.
+             */
+            while (num_draws > 1 && !draws[num_draws - 1].count)
+               num_draws--;
+         }
+
          for (unsigned i = 0; i < num_draws; i++) {
             uint64_t va = index_va + draws[i].start * index_size;
 



More information about the mesa-commit mailing list