panfrost: Add writes_stencil to the EARLY_Z disable list
authorIcecream95 <ixn@keemail.me>
Sat, 6 Jun 2020 10:32:04 +0000 (22:32 +1200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 10 Jun 2020 13:54:03 +0000 (13:54 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>

src/gallium/drivers/panfrost/pan_cmdstream.c

index 608d1799f9785057b4e9367f0bfb6f27b7d66390..1533494c7f047615ba3e9c651f5b05088816f8e3 100644 (file)
@@ -844,7 +844,8 @@ panfrost_frag_shader_meta_init(struct panfrost_context *ctx,
                  * enable early-z testing. TODO: respect e-z force */
 
                 SET_BIT(fragmeta->midgard1.flags_lo, MALI_EARLY_Z,
-                        !fs->can_discard && !fs->writes_depth && !fs->writes_global);
+                        !fs->can_discard && !fs->writes_global &&
+                        !fs->writes_depth && !fs->writes_stencil);
 
                 /* Add the writes Z/S flags if needed. */
                 SET_BIT(fragmeta->midgard1.flags_lo, MALI_WRITES_Z, fs->writes_depth);