Module: Mesa Branch: staging/23.1 Commit: c2995474fa46079810c6870557e8402f7d235cdf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2995474fa46079810c6870557e8402f7d235cdf
Author: Mike Blumenkrantz <[email protected]> Date: Thu Aug 3 13:11:57 2023 -0400 zink: force image barriers after dmabuf import if the image will be used, then it has to be on the right queue cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24492> (cherry picked from commit 4f5bfc6691093e547816818340281437e504e86a) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_synchronization.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d0a6a736b53..12b1cc6bf8b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -76,7 +76,7 @@ "description": "zink: force image barriers after dmabuf import", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_synchronization.cpp b/src/gallium/drivers/zink/zink_synchronization.cpp index a19117ce357..c80d99b9d5e 100644 --- a/src/gallium/drivers/zink/zink_synchronization.cpp +++ b/src/gallium/drivers/zink/zink_synchronization.cpp @@ -322,7 +322,8 @@ zink_resource_image_barrier(struct zink_context *ctx, struct zink_resource *res, if (!flags) flags = access_dst_flags(new_layout); - if (!res->obj->needs_zs_evaluate && !zink_resource_image_needs_barrier(res, new_layout, flags, pipeline)) + if (!res->obj->needs_zs_evaluate && !zink_resource_image_needs_barrier(res, new_layout, flags, pipeline) && + (res->queue == zink_screen(ctx->base.screen)->gfx_queue || res->queue == VK_QUEUE_FAMILY_IGNORED)) return; bool is_write = zink_resource_access_is_write(flags); VkCommandBuffer cmdbuf;
