Mesa (main): llvmpipe: simplify early/late zs tests selection

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 05:02:10 UTC 2022


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

Author: Pavel Asyutchenko <sventeam at yandex.ru>
Date:   Sun Jun 19 21:13:26 2022 +0300

llvmpipe: simplify early/late zs tests selection

This does not change selection logic.

Signed-off-by: Pavel Asyutchenko <sventeam at yandex.ru>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13979>

---

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

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 300c8db234f..cff9fd8e016 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -624,10 +624,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
       if (shader->info.base.properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL])
          depth_mode = EARLY_DEPTH_TEST | EARLY_DEPTH_WRITE;
       else if (!shader->info.base.writes_z && !shader->info.base.writes_stencil &&
-               !shader->info.base.uses_fbfetch) {
-         if (shader->info.base.writes_memory)
-            depth_mode = LATE_DEPTH_TEST | LATE_DEPTH_WRITE;
-         else if (key->alpha.enabled ||
+               !shader->info.base.uses_fbfetch && !shader->info.base.writes_memory) {
+         if (key->alpha.enabled ||
              key->blend.alpha_to_coverage ||
              shader->info.base.uses_kill ||
              shader->info.base.writes_samplemask) {



More information about the mesa-commit mailing list