zink: fix end-of-batch barrier pipeline stages

ALL_COMMANDS covers all the layouts used here

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25460>
This commit is contained in:
Mike Blumenkrantz
2023-09-28 13:33:49 -04:00
committed by Marge Bot
parent d0dd973fe2
commit 4ef2226210

View File

@@ -758,7 +758,7 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
struct zink_resource *res = (void*)entry->key;
if (screen->info.have_KHR_synchronization2) {
VkImageMemoryBarrier2 imb;
zink_resource_image_barrier2_init(&imb, res, res->layout, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT);
zink_resource_image_barrier2_init(&imb, res, res->layout, 0, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
imb.srcQueueFamilyIndex = screen->gfx_queue;
imb.dstQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT;
VkDependencyInfo dep = {
@@ -775,13 +775,13 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
VKCTX(CmdPipelineBarrier2)(bs->cmdbuf, &dep);
} else {
VkImageMemoryBarrier imb;
zink_resource_image_barrier_init(&imb, res, res->layout, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT);
zink_resource_image_barrier_init(&imb, res, res->layout, 0, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
imb.srcQueueFamilyIndex = screen->gfx_queue;
imb.dstQueueFamilyIndex = VK_QUEUE_FAMILY_FOREIGN_EXT;
VKCTX(CmdPipelineBarrier)(
bs->cmdbuf,
res->obj->access_stage,
VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
0,
0, NULL,
0, NULL,