Mesa (staging/21.1): zink: move wsi flush info conditional to queue submission

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 21 19:46:41 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: 687a8bf579c770f3d8aa5e51dbf6e6f9c10e5151
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=687a8bf579c770f3d8aa5e51dbf6e6f9c10e5151

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Apr 20 15:05:37 2021 -0400

zink: move wsi flush info conditional to queue submission

having a resource pointer on batch states is now a requirement for
keeping scanout objects in sync

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax at redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
(cherry picked from commit 7af40bb595881a5bdef8870df7ca8605b86d2107)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/zink/zink_batch.c   | 2 +-
 src/gallium/drivers/zink/zink_context.c | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 0aad7d91c6f..436a493f146 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -76,7 +76,7 @@
         "description": "zink: move wsi flush info conditional to queue submission",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "104603fa763c52e98a79785dd514beab949546db"
     },
diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index 7fe5f860d40..b19a1ba5e48 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -337,7 +337,7 @@ submit_queue(void *data, int thread_index)
       .pNext = si.pNext,
    };
 
-   if (bs->flush_res) {
+   if (bs->flush_res && zink_screen(bs->ctx->base.screen)->needs_mesa_flush_wsi) {
       mem_signal.memory = bs->flush_res->scanout_obj ? bs->flush_res->scanout_obj->mem : bs->flush_res->obj->mem;
       si.pNext = &mem_signal;
    }
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 636b3fb4c95..403ff69d94a 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1705,8 +1705,7 @@ zink_flush(struct pipe_context *pctx,
          zink_begin_render_pass(ctx, batch);
       zink_end_render_pass(ctx, batch);
       if (ctx->flush_res) {
-         if (zink_screen(pctx->screen)->needs_mesa_flush_wsi)
-            batch->state->flush_res = ctx->flush_res;
+         batch->state->flush_res = ctx->flush_res;
          ctx->flush_res = NULL;
       }
    }



More information about the mesa-commit mailing list