Mesa (staging/20.3): etnaviv: Fix rework ZSA into a derived state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 4 17:43:30 UTC 2021


Module: Mesa
Branch: staging/20.3
Commit: d7c09d09aa0b3532839adb761f7a96d6956622f4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7c09d09aa0b3532839adb761f7a96d6956622f4

Author: Marek Vasut <marex at denx.de>
Date:   Sat Dec 19 01:23:12 2020 +0100

etnaviv: Fix rework ZSA into a derived state

In case the stencil is modified, it is also enabled. That was the
behavior of the original code, which was also the correct behavior,
so reinstate the behavior.

Fixes dEQP-GLES2.functional.fragment_ops.depth_stencil.* on STM32MP1 GC400T.

Fixes: b29fe26d438 ("etnaviv: rework ZSA into a derived state")
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Signed-off-by: Marek Vasut <marex at denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8174>
(cherry picked from commit 33a6c01e12cca60903fb78af44ecca3899ad628f)

---

 .pick_status.json                         | 2 +-
 src/gallium/drivers/etnaviv/etnaviv_zsa.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 6cbca26feb6..b0a96f111a1 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -526,7 +526,7 @@
         "description": "etnaviv: Fix rework ZSA into a derived state",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "b29fe26d43874c90df60edbffda70fca67b98e4a"
     },
diff --git a/src/gallium/drivers/etnaviv/etnaviv_zsa.c b/src/gallium/drivers/etnaviv/etnaviv_zsa.c
index 66d0c290c9f..b0f94993622 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_zsa.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_zsa.c
@@ -77,11 +77,13 @@ etna_zsa_state_create(struct pipe_context *pctx,
       if (so->stencil[0].fail_op != PIPE_STENCIL_OP_KEEP ||
           so->stencil[0].zfail_op != PIPE_STENCIL_OP_KEEP ||
           so->stencil[0].zpass_op != PIPE_STENCIL_OP_KEEP) {
+         cs->stencil_enabled = 1;
          cs->stencil_modified = 1;
       } else if (so->stencil[1].enabled) {
          if (so->stencil[1].fail_op != PIPE_STENCIL_OP_KEEP ||
              so->stencil[1].zfail_op != PIPE_STENCIL_OP_KEEP ||
              so->stencil[1].zpass_op != PIPE_STENCIL_OP_KEEP) {
+            cs->stencil_enabled = 1;
             cs->stencil_modified = 1;
          }
       }



More information about the mesa-commit mailing list