diff options
author | Duncan Hopkins <duncan@thefoundry.co.uk> | 2019-10-30 13:26:23 +0100 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-11-11 11:44:26 -0800 |
commit | 52005416a027d30c65a8953e639abc6eb97d75e7 (patch) | |
tree | 7448cdad92af14ac3939e315dd929a8a74a4896f | |
parent | 0b670a919ce18f9c6cc8755d2faa957c7cf9cbc9 (diff) |
zink: make sure src image is transfer-src-optimal
Fixes: d2bb63c8d4c ("zink: Use optimal layout instead of general. Reduces valid layer warnings. Fixes RADV image noise.")
(cherry picked from commit aa64b6dc7f67852bf2a197c00232a28d812d5563)
-rw-r--r-- | src/gallium/drivers/zink/zink_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 7c7dcc2bfae..e553c717e0c 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -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); |