Mesa (master): zink: make sure src image is transfer-src-optimal

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 6 12:04:53 UTC 2019


Module: Mesa
Branch: master
Commit: aa64b6dc7f67852bf2a197c00232a28d812d5563
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa64b6dc7f67852bf2a197c00232a28d812d5563

Author: Duncan Hopkins <duncan at thefoundry.co.uk>
Date:   Wed Oct 30 13:26:23 2019 +0100

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.")

---

 src/gallium/drivers/zink/zink_context.c | 4 ++++
 1 file changed, 4 insertions(+)

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




More information about the mesa-commit mailing list