Mesa (staging/22.1): panfrost: Fix inverted indirect dispatch condition

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 8 16:15:07 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 364767c445a4d2e9de7b50f2adf391beab7b69e3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=364767c445a4d2e9de7b50f2adf391beab7b69e3

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Jun  6 16:48:57 2022 -0400

panfrost: Fix inverted indirect dispatch condition

Inverted condition -- indirect dispatch gets disabled when WLS is in use, not
the other way around. Not sure how this worked before...

Fixes: fd7b44882ce ("panfrost: Use direct dispatch with shared memory")
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16916>
(cherry picked from commit 3c5f1595b89d02df92bead419e8bbb0511d14201)

---

 .pick_status.json                            | 2 +-
 src/gallium/drivers/panfrost/pan_cmdstream.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 370a6b94d92..60d2ac3cd54 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -283,7 +283,7 @@
         "description": "panfrost: Fix inverted indirect dispatch condition",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "fd7b44882ce3c7604be592f484264097125dfa52"
     },
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 3cc8371387f..37f2144d8b3 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -3522,7 +3522,7 @@ panfrost_launch_grid(struct pipe_context *pipe,
 
         /* Indirect dispatch can't handle workgroup local storage since that
          * would require dynamic memory allocation. Bail in this case. */
-        if (info->indirect && (!cs->info.wls_size || !PAN_GPU_INDIRECTS)) {
+        if (info->indirect && ((cs->info.wls_size != 0) || !PAN_GPU_INDIRECTS)) {
                 struct pipe_transfer *transfer;
                 uint32_t *params = pipe_buffer_map_range(pipe, info->indirect,
                                 info->indirect_offset,



More information about the mesa-commit mailing list