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 <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6924>
This commit is contained in:
Mike Blumenkrantz
2020-06-29 14:28:27 -04:00
parent 8dfb941a4c
commit 270969b55e

View File

@@ -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);
}