summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2023-08-03 13:11:57 -0400
committerMarge Bot <emma+marge@anholt.net>2023-08-07 01:43:52 +0000
commit4f5bfc6691093e547816818340281437e504e86a (patch)
treed67af95426d1eae2e8658ad10717813888eb6581
parent652e87bc5d02903e4ea00602de84d803f10d414e (diff)
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>
-rw-r--r--src/gallium/drivers/zink/zink_synchronization.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/zink_synchronization.cpp b/src/gallium/drivers/zink/zink_synchronization.cpp
index 2942d57196c..381531ed8a7 100644
--- a/src/gallium/drivers/zink/zink_synchronization.cpp
+++ b/src/gallium/drivers/zink/zink_synchronization.cpp
@@ -331,7 +331,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;