if (res->obj->needs_zs_evaluate)
imb.pNext = &res->obj->zs_evaluate;
res->obj->needs_zs_evaluate = false;
- if (res->dmabuf_acquire) {
- imb.srcQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT;
+ if (res->queue != zink_screen(ctx->base.screen)->gfx_queue && res->queue != VK_QUEUE_FAMILY_IGNORED) {
+ imb.srcQueueFamilyIndex = res->queue;
imb.dstQueueFamilyIndex = zink_screen(ctx->base.screen)->gfx_queue;
- res->dmabuf_acquire = false;
+ res->queue = VK_QUEUE_FAMILY_IGNORED;
}
bool marker = zink_cmd_debug_marker_begin(ctx, cmdbuf, "image_barrier(%s->%s)", vk_ImageLayout_to_str(res->layout), vk_ImageLayout_to_str(new_layout));
VKCTX(CmdPipelineBarrier)(
if (res->obj->needs_zs_evaluate)
imb.pNext = &res->obj->zs_evaluate;
res->obj->needs_zs_evaluate = false;
- if (res->dmabuf_acquire) {
- imb.srcQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT;
+ if (res->queue != zink_screen(ctx->base.screen)->gfx_queue && res->queue != VK_QUEUE_FAMILY_IGNORED) {
+ imb.srcQueueFamilyIndex = res->queue;
imb.dstQueueFamilyIndex = zink_screen(ctx->base.screen)->gfx_queue;
- res->dmabuf_acquire = false;
+ res->queue = VK_QUEUE_FAMILY_IGNORED;
}
VkDependencyInfo dep = {
VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
}
ctx->batch.swapchain = res;
} else if (res->dmabuf)
- res->dmabuf_acquire = true;
+ res->queue = VK_QUEUE_FAMILY_FOREIGN_EXT;
}
static struct pipe_stream_output_target *
res->need_2D = (screen->need_2D_zs && util_format_is_depth_or_stencil(templ->format)) ||
(screen->need_2D_sparse && (templ->flags & PIPE_RESOURCE_FLAG_SPARSE));
}
- res->dmabuf = res->dmabuf_acquire = whandle && whandle->type == WINSYS_HANDLE_TYPE_FD;
- res->layout = res->dmabuf_acquire ? VK_IMAGE_LAYOUT_PREINITIALIZED : VK_IMAGE_LAYOUT_UNDEFINED;
+ res->dmabuf = whandle && whandle->type == WINSYS_HANDLE_TYPE_FD;
+ if (res->dmabuf)
+ res->queue = VK_QUEUE_FAMILY_FOREIGN_EXT;
+ res->layout = res->dmabuf ? VK_IMAGE_LAYOUT_PREINITIALIZED : VK_IMAGE_LAYOUT_UNDEFINED;
res->linear = linear;
res->aspect = aspect_from_format(templ->format);
}