panfrost: Don't check alpha test in fs_required on Bifrost+
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 30 Mar 2022 16:39:17 +0000 (12:39 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 17:43:37 +0000 (17:43 +0000)
Alpha testing is only native on Midgard. Saves a few instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15797>

src/gallium/drivers/panfrost/pan_cmdstream.c

index 94ac319f8331133702a95bed3b96430e1ad0ac7a..dad1b2f34b4b20d7a9c730397d1dd77262bd4498 100644 (file)
@@ -233,8 +233,10 @@ panfrost_fs_required(
                 return true;
 
         /* Using an empty FS requires early-z to be enabled, but alpha test
-         * needs it disabled */
-        if ((enum mali_func) zsa->base.alpha_func != MALI_FUNC_ALWAYS)
+         * needs it disabled. Alpha test is only native on Midgard, so only
+         * check there.
+         */
+        if (PAN_ARCH <= 5 && zsa->base.alpha_func != PIPE_FUNC_ALWAYS)
                 return true;
 
         /* If colour is written we need to execute */