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:10:52 UTC 2021


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

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

---

 .pick_status.json                              |  2 +-
 src/gallium/drivers/radeonsi/si_state_draw.cpp | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 932beaa183c..07b850fa677 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4855,7 +4855,7 @@
         "description": "radeonsi: add a gfx10 bug workaround for NOT_EOP",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "cc24ec8c0772015d8ef0d10e646e89e9014e9e1d"
     },
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