Module: Mesa Branch: main Commit: 865e9311a29c193f1b331646dbeeccce8c461365 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=865e9311a29c193f1b331646dbeeccce8c461365
Author: Mike Blumenkrantz <[email protected]> Date: Fri Feb 17 17:09:50 2023 -0500 zink: utilize copy box tracking to avoid barrier emission for buf2img copies this should reduce synchronization during e.g., miplevel population Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21397> --- src/gallium/drivers/zink/zink_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index a1fe7eecf39..767abaeb0b1 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -4544,7 +4544,11 @@ zink_copy_image_buffer(struct zink_context *ctx, struct zink_resource *dst, stru if (!zink_kopper_acquire(ctx, img, UINT64_MAX)) return; } - zink_screen(ctx->base.screen)->image_barrier(ctx, img, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, 0); + struct pipe_box box = *src_box; + box.x = dstx; + box.y = dsty; + box.z = dstz; + zink_resource_image_transfer_dst_barrier(ctx, img, dst_level, &box); zink_screen(ctx->base.screen)->buffer_barrier(ctx, buf, VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT); } else { if (zink_is_swapchain(img))
