From 1277192d55cbcc4342027da0e77fa5b1e7637992 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 1 Nov 2019 10:36:30 +0100 Subject: [PATCH] zink: transition resources before resolving --- src/gallium/drivers/zink/zink_context.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 133c75382da..1fd6a3da5a7 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1273,6 +1273,14 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info) zink_batch_reference_resoure(batch, src); zink_batch_reference_resoure(batch, dst); + if (src->layout != VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) + zink_resource_barrier(batch->cmdbuf, src, src->aspect, + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); + + if (dst->layout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) + zink_resource_barrier(batch->cmdbuf, dst, dst->aspect, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); + VkImageResolve region = {}; region.srcSubresource.aspectMask = src->aspect; -- 2.30.2