diff --git a/src/gallium/drivers/zink/zink_clear.c b/src/gallium/drivers/zink/zink_clear.c index 0aaeb2c169e..dbd09d68403 100644 --- a/src/gallium/drivers/zink/zink_clear.c +++ b/src/gallium/drivers/zink/zink_clear.c @@ -512,7 +512,7 @@ zink_clear_buffer(struct pipe_context *pctx, or VK_WHOLE_SIZE to fill the range from offset to the end of the buffer */ util_range_add(&res->base.b, &res->valid_buffer_range, offset, offset + size); - zink_screen(ctx->base.screen)->buffer_barrier(ctx, res, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT); + zink_resource_buffer_transfer_dst_barrier(ctx, res, offset, size); VkCommandBuffer cmdbuf = zink_get_cmdbuf(ctx, NULL, res); zink_batch_reference_resource_rw(&ctx->batch, res, true); VKCTX(CmdFillBuffer)(cmdbuf, res->obj->buffer, offset, size, *(uint32_t*)clear_value); diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 94548ab3422..1f2b3c530cf 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -4678,7 +4678,7 @@ zink_copy_buffer(struct zink_context *ctx, struct zink_resource *dst, struct zin struct zink_batch *batch = &ctx->batch; util_range_add(&dst->base.b, &dst->valid_buffer_range, dst_offset, dst_offset + size); zink_screen(ctx->base.screen)->buffer_barrier(ctx, src, VK_ACCESS_TRANSFER_READ_BIT, 0); - zink_screen(ctx->base.screen)->buffer_barrier(ctx, dst, VK_ACCESS_TRANSFER_WRITE_BIT, 0); + zink_resource_buffer_transfer_dst_barrier(ctx, dst, dst_offset, size); VkCommandBuffer cmdbuf = zink_get_cmdbuf(ctx, src, dst); zink_batch_reference_resource_rw(batch, src, false); zink_batch_reference_resource_rw(batch, dst, true); @@ -4712,7 +4712,7 @@ zink_copy_image_buffer(struct zink_context *ctx, struct zink_resource *dst, stru if (zink_is_swapchain(img)) needs_present_readback = zink_kopper_acquire_readback(ctx, img); zink_screen(ctx->base.screen)->image_barrier(ctx, img, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, 0, 0); - zink_screen(ctx->base.screen)->buffer_barrier(ctx, buf, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT); + zink_resource_buffer_transfer_dst_barrier(ctx, buf, dstx, src_box->width); util_range_add(&dst->base.b, &dst->valid_buffer_range, dstx, dstx + src_box->width); }