Mesa (main): panfrost: Only allow colour blit shaders to be killed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 16 16:34:55 UTC 2021


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

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>

---

 src/panfrost/lib/pan_blitter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/lib/pan_blitter.c b/src/panfrost/lib/pan_blitter.c
index 7aeb985c4b9..48e3bd2b603 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