panfrost: Don't allow_forward_pixel_to_kill for Z/S blit
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 15 Apr 2021 22:09:19 +0000 (18:09 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 19 Apr 2021 20:32:59 +0000 (20:32 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10271>

src/panfrost/lib/pan_blitter.c

index ff75ecc..76d9a96 100644 (file)
@@ -163,7 +163,13 @@ pan_blitter_prepare_bifrost_rsd(const struct panfrost_device *dev,
                 rsd->properties.bifrost.pixel_kill_operation =
                         MALI_PIXEL_KILL_FORCE_EARLY;
         }
-        rsd->properties.bifrost.allow_forward_pixel_to_kill = true;
+
+        /* 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. */
+
+        rsd->properties.bifrost.allow_forward_pixel_to_kill = !(z || s);
+
         rsd->preload.fragment.coverage = true;
         rsd->preload.fragment.sample_mask_id = ms;
 }