Mesa (staging/21.1): Revert "zink: force scanout sync when mapping scanout resource"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 22 20:36:50 UTC 2021


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

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

Revert "zink: force scanout sync when mapping scanout resource"

This reverts commit 874535752b497bd8ab49cf97add6de2ed9b16f81.

Reviewed-by: Adam Jackson <ajax at redhat.com>

Fixes: 874535752b4 ("zink: force scanout sync when mapping scanout resource")

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 82710b8fc4fbdb08da7db02f8a64fadb8d43525f)

---

 .pick_status.json                        |  2 +-
 src/gallium/drivers/zink/zink_resource.c | 18 ------------------
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index ec7709cb83c..649aad7440a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -103,7 +103,7 @@
         "description": "Revert \"zink: force scanout sync when mapping scanout resource\"",
         "nominated": false,
         "nomination_type": 2,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "874535752b497bd8ab49cf97add6de2ed9b16f81"
     },
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index bf51add034a..5cf4e812fa8 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1003,17 +1003,8 @@ zink_transfer_map(struct pipe_context *pctx,
 
          if (usage & PIPE_MAP_READ) {
             zink_transfer_copy_bufimage(ctx, staging_res, res, trans);
-            /* TODO: remove for wsi */
-            struct zink_resource *scanout = NULL;
-            if (res->scanout_obj) {
-               scanout = ctx->flush_res;
-               ctx->flush_res = res;
-            }
             /* need to wait for rendering to finish */
             zink_fence_wait(pctx);
-            /* TODO: remove for wsi */
-            if (res->scanout_obj)
-               ctx->flush_res = scanout;
          }
 
          ptr = base = map_resource(screen, staging_res);
@@ -1028,19 +1019,10 @@ zink_transfer_map(struct pipe_context *pctx,
          if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_READ))
             resource_sync_reads(ctx, res);
          if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_RW)) {
-            /* TODO: remove for wsi */
-            struct zink_resource *scanout = NULL;
-            if (res->scanout_obj) {
-               scanout = ctx->flush_res;
-               ctx->flush_res = res;
-            }
             if (usage & PIPE_MAP_READ)
                resource_sync_writes_from_batch_usage(ctx, res);
             else
                zink_fence_wait(pctx);
-            /* TODO: remove for wsi */
-            if (res->scanout_obj)
-               ctx->flush_res = scanout;
          }
          VkImageSubresource isr = {
             res->aspect,



More information about the mesa-commit mailing list