Mesa (main): zink: acquire swapchain images on image map

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 28 02:57:47 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Jun 21 16:35:36 2022 -0400

zink: acquire swapchain images on image map

this is a weird one

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17149>

---

 src/gallium/drivers/zink/zink_resource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 8efdae55c49..0bedd2cf194 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1862,6 +1862,9 @@ zink_image_map(struct pipe_context *pctx,
       return NULL;
 
    trans->base.b.level = level;
+   if (zink_is_swapchain(res))
+      /* this is probably a multi-chain which has already been acquired */
+      zink_kopper_acquire(ctx, res, 0);
 
    void *ptr;
    if (usage & PIPE_MAP_WRITE && !(usage & PIPE_MAP_READ))



More information about the mesa-commit mailing list