summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDuncan Hopkins <[email protected]>2019-10-30 13:26:23 +0100
committerErik Faye-Lund <[email protected]>2019-11-06 11:37:36 +0000
commitaa64b6dc7f67852bf2a197c00232a28d812d5563 (patch)
tree9c9e6ad8f5cec940d4247bc813bdfcb8f83306c1 /src
parenta32a92f53a3bbb2f2748c0093c9f380a98a08f06 (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.")
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/zink/zink_context.c4
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 028b95cd0d1..133c75382da 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1321,6 +1321,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);