Mesa (main): panfrost: Disable shader-assisted indirect draws

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 20 20:29:21 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Fri Aug 13 23:11:39 2021 +0000

panfrost: Disable shader-assisted indirect draws

Although it is passing all of dEQP-GLES31, it is failing a few
KHR-GLES31.* tests. It also has performance issues at the moment. Invert
the existing noindirect debug flag to become a indirect debug flag. Set
this flag for dEQP-GLES31 CI on G52, to make sure the code doesn't bit
rot on the hope someone will pick this up later on.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478>

---

 src/gallium/drivers/panfrost/ci/gitlab-ci.yml | 2 +-
 src/gallium/drivers/panfrost/pan_cmdstream.c  | 4 ++--
 src/gallium/drivers/panfrost/pan_screen.c     | 6 +-----
 src/panfrost/lib/pan_util.h                   | 2 +-
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
index 01f91016200..9af4cdd3b0b 100644
--- a/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
+++ b/src/gallium/drivers/panfrost/ci/gitlab-ci.yml
@@ -154,7 +154,7 @@ panfrost-g52-gles31:arm64:
     - .lava-meson-g12b-a311d-khadas-vim3
   variables:
     DEQP_VER: gles31
-    PAN_MESA_DEBUG: "deqp,sync"
+    PAN_MESA_DEBUG: "deqp,sync,indirect"
     DEQP_PARALLEL: 6
     DEQP_EXPECTED_RENDERER: G52
 
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 5857556775e..2721729bdbc 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -2998,8 +2998,8 @@ panfrost_draw_vbo(struct pipe_context *pipe,
         if (!panfrost_render_condition_check(ctx))
                 return;
 
-        /* Emulate indirect draws when debugging */
-        if (dev->debug & PAN_DBG_NOINDIRECT && indirect && indirect->buffer) {
+        /* Emulate indirect draws unless we're using the experimental path */
+        if (!(dev->debug & PAN_DBG_INDIRECT) && indirect && indirect->buffer) {
                 assert(num_draws == 1);
                 util_draw_indirect(pipe, info, indirect);
                 return;
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index 5067a64dbad..15e01ea4ff9 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -68,7 +68,7 @@ static const struct debug_named_value panfrost_debug_options[] = {
         {"noafbc",    PAN_DBG_NO_AFBC,  "Disable AFBC support"},
         {"nocrc",     PAN_DBG_NO_CRC,   "Disable transaction elimination"},
         {"msaa16",    PAN_DBG_MSAA16,   "Enable MSAA 8x and 16x support"},
-        {"noindirect", PAN_DBG_NOINDIRECT, "Emulate indirect draws on the CPU"},
+        {"indirect",  PAN_DBG_INDIRECT, "Use experimental compute kernel for indirect draws"},
         {"linear",    PAN_DBG_LINEAR,   "Force linear textures"},
         {"nocache",   PAN_DBG_NO_CACHE, "Disable BO cache"},
         DEBUG_NAMED_VALUE_END
@@ -840,10 +840,6 @@ panfrost_create_screen(int fd, struct renderonly *ro)
         if (dev->arch == 7)
                 dev->quirks |= MIDGARD_NO_AFBC;
 
-        /* XXX: Indirect draws on Midgard need debugging, emulate for now */
-        if (dev->arch < 6)
-                dev->debug |= PAN_DBG_NOINDIRECT;
-
         dev->ro = ro;
 
         /* Check if we're loading against a supported GPU model. */
diff --git a/src/panfrost/lib/pan_util.h b/src/panfrost/lib/pan_util.h
index 6af0ac2887e..3fd9503a663 100644
--- a/src/panfrost/lib/pan_util.h
+++ b/src/panfrost/lib/pan_util.h
@@ -43,7 +43,7 @@
 #define PAN_DBG_GL3             0x0100
 #define PAN_DBG_NO_AFBC         0x0200
 #define PAN_DBG_MSAA16          0x0400
-#define PAN_DBG_NOINDIRECT      0x0800
+#define PAN_DBG_INDIRECT        0x0800
 #define PAN_DBG_LINEAR          0x1000
 #define PAN_DBG_NO_CACHE        0x2000
 



More information about the mesa-commit mailing list