diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 0ade85d13d1..a27e9bd681f 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -107,6 +107,19 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch) if (!batch->fence) return; + util_dynarray_foreach(&batch->persistent_resources, struct zink_resource*, res) { + struct zink_screen *screen = zink_screen(ctx->base.screen); + assert(!(*res)->offset); + VkMappedMemoryRange range = { + VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, + NULL, + (*res)->mem, + (*res)->offset, + VK_WHOLE_SIZE, + }; + vkFlushMappedMemoryRanges(screen->dev, 1, &range); + } + VkSubmitInfo si = {}; si.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; si.waitSemaphoreCount = 0;