Mesa (staging/21.2): panfrost: Only allow colour blit shaders to be killed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 16 19:02:11 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: 8d5da6b0b473f8ed5ea9c375e9c01ca41791f600
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d5da6b0b473f8ed5ea9c375e9c01ca41791f600

Author: Icecream95 <ixn at disroot.org>
Date:   Sun Aug  8 14:08:08 2021 +1200

panfrost: Only allow colour blit shaders to be killed

Fixes timeouts in SuperTuxKart with the advanced rendering pipeline.

Fixes: d0344619214 ("panfrost: Set allow_forward_pixel_to_be_killed for blit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12267>
(cherry picked from commit 0624346a20604eeabd5aa1c88811449ef9473ed4)

---

 .pick_status.json              | 2 +-
 src/panfrost/lib/pan_blitter.c | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 8ef8b96575d..86eeea9b338 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -148,7 +148,7 @@
         "description": "panfrost: Only allow colour blit shaders to be killed",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "d0344619214b43db8bc5a928dd09d1fcf8f725fc"
     },
diff --git a/src/panfrost/lib/pan_blitter.c b/src/panfrost/lib/pan_blitter.c
index b1ec8855128..23de9d67135 100644
--- a/src/panfrost/lib/pan_blitter.c
+++ b/src/panfrost/lib/pan_blitter.c
@@ -168,10 +168,13 @@ pan_blitter_prepare_bifrost_rsd(const struct panfrost_device *dev,
         /* We can only allow blit shader fragments to kill if they write all
          * colour outputs. This is true for our colour (non-Z/S) blit shaders,
          * but obviously not true for Z/S shaders. However, blit shaders
-         * otherwise lack side effects, so other fragments may kill them. */
+         * otherwise lack side effects, so other fragments may kill them.
+         * However, while shaders writing Z/S can normally be killed, on v6
+         * for frame shaders it can cause GPU timeouts, so only allow colour
+         * blit shaders to be killed. */
 
         rsd->properties.bifrost.allow_forward_pixel_to_kill = !zs;
-        rsd->properties.bifrost.allow_forward_pixel_to_be_killed = true;
+        rsd->properties.bifrost.allow_forward_pixel_to_be_killed = (dev->arch >= 7) || !zs;
 
         rsd->preload.fragment.coverage = true;
         rsd->preload.fragment.sample_mask_id = ms;



More information about the mesa-commit mailing list