From 270969b55ef19edd908ae77a86297907e6035dd2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 29 Jun 2020 14:28:27 -0400 Subject: [PATCH] zink: explicitly flag fb attachments as being written to in render passes we need to ensure that we're accurately setting this hint in order to avoid synchronization issues when determining whether we can read from the buffer Reviewed-by: Erik Faye-Lun Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 6043ff461ee..0ea5a5066b1 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -552,6 +552,8 @@ zink_begin_render_pass(struct zink_context *ctx, struct zink_batch *batch) zink_render_pass_reference(screen, &batch->rp, ctx->gfx_pipeline_state.render_pass); zink_framebuffer_reference(screen, &batch->fb, ctx->framebuffer); + for (struct zink_surface **surf = (struct zink_surface **)batch->fb->surfaces; *surf; surf++) + zink_batch_reference_resource_rw(batch, zink_resource((*surf)->base.texture), true); vkCmdBeginRenderPass(batch->cmdbuf, &rpbi, VK_SUBPASS_CONTENTS_INLINE); }