From 3c3764f7df5ebc986657df97f06e78d990d888bf Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 11 Aug 2020 18:36:52 -0400 Subject: [PATCH] zink: don't force a renderpass start when setting framebuffer state this breaks compute and isn't strictly necessary since we'll be starting a renderpass during draw anyway; we just need to flush here to update the state Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_context.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 38c5e47bacd..e87774f3fb3 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -903,9 +903,11 @@ zink_set_framebuffer_state(struct pipe_context *pctx, ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs; ctx->gfx_pipeline_state.dirty = true; - struct zink_batch *batch = zink_batch_no_rp(ctx); + /* need to start a new renderpass */ + if (zink_curr_batch(ctx)->in_rp) + flush_batch(ctx); - framebuffer_state_buffer_barriers_setup(ctx, state, batch); + framebuffer_state_buffer_barriers_setup(ctx, &ctx->fb_state, zink_curr_batch(ctx)); } static void