Mesa (main): asahi: Set data_valid for the depth buffer

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 6 13:55:48 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Mon Jul  5 20:14:58 2021 -0400

asahi: Set data_valid for the depth buffer

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>

---

 src/gallium/drivers/asahi/agx_pipe.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c
index 49427ebdf67..8142508ccc1 100644
--- a/src/gallium/drivers/asahi/agx_pipe.c
+++ b/src/gallium/drivers/asahi/agx_pipe.c
@@ -459,6 +459,12 @@ agx_flush(struct pipe_context *pctx,
    struct agx_resource *rt0 = agx_resource(ctx->batch->cbufs[0]->texture);
    BITSET_SET(rt0->data_valid, 0);
 
+   struct agx_resource *zbuf = ctx->batch->zsbuf ?
+      agx_resource(ctx->batch->zsbuf->texture) : NULL;
+
+   if (zbuf)
+      BITSET_SET(zbuf->data_valid, 0);
+
    /* BO list for a given batch consists of:
     *  - BOs for the batch's framebuffer surfaces
     *  - BOs for the batch's pools



More information about the mesa-commit mailing list