zink: make sure src image is transfer-src-optimal

Fixes: d2bb63c8d4 ("zink: Use optimal layout instead of general. Reduces valid layer warnings. Fixes RADV image noise.")
(cherry picked from commit aa64b6dc7f)
This commit is contained in:
Duncan Hopkins 2019-10-30 13:26:23 +01:00 committed by Dylan Baker
parent 0b670a919c
commit 52005416a0

View file

@ -1314,6 +1314,10 @@ blit_native(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);