Mesa (main): panfrost: Don't check alpha test in fs_required on Bifrost+

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 18:02:37 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Wed Mar 30 12:39:17 2022 -0400

panfrost: Don't check alpha test in fs_required on Bifrost+

Alpha testing is only native on Midgard. Saves a few instructions.

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

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 94ac319f833..dad1b2f34b4 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -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 */



More information about the mesa-commit mailing list