zink: acquire swapchain images on image map

this is a weird one

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17149>
This commit is contained in:
Mike Blumenkrantz 2022-06-21 16:35:36 -04:00 committed by Marge Bot
parent b400f1defc
commit 6786e508a2
1 changed files with 3 additions and 0 deletions

View File

@ -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))