Mesa (staging/21.3): radeonsi: enable shader culling for indirect draws

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 1 19:36:40 UTC 2021


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Oct 27 01:25:49 2021 -0400

radeonsi: enable shader culling for indirect draws

It was mistakenly disabled, decreasing performance a lot.

Only valid for Mesa 21.3.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Cc: 21.3 <mesa-stable at lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539>
(cherry picked from commit 98f696c972f9415892c19b405217285003234058)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 17b0eaacf8b..6e0475530fc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -562,7 +562,7 @@
         "description": "radeonsi: enable shader culling for indirect draws",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index a16f834831c..e090244ae9c 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -2210,6 +2210,7 @@ static void si_draw(struct pipe_context *ctx,
             si_resource(indirect->indirect_draw_count)->TC_L2_dirty = false;
          }
       }
+      total_direct_count = INT_MAX; /* just set something other than 0 to enable shader culling */
    } else {
       total_direct_count = min_direct_count = draws[0].count;
 



More information about the mesa-commit mailing list