From 22fb4578a089d83be56fc4282f28a8ecd332cefe Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 15 Mar 2023 14:04:32 -0400 Subject: [PATCH] zink: end rp earlier in set_framebuffer_state this way any barriers occuring from unbinds won't have to do rp calc Part-of: --- src/gallium/drivers/zink/zink_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 463065f..b59bd10 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3285,6 +3285,8 @@ zink_set_framebuffer_state(struct pipe_context *pctx, zink_batch_rp(ctx); ctx->queries_disabled = queries_disabled; } + /* need to ensure we start a new rp on next draw */ + zink_batch_no_rp_safe(ctx); for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) { struct pipe_surface *psurf = ctx->fb_state.cbufs[i]; if (i < state->nr_cbufs) @@ -3418,8 +3420,6 @@ zink_set_framebuffer_state(struct pipe_context *pctx, } ctx->gfx_pipeline_state.rast_samples = rast_samples; - /* need to ensure we start a new rp on next draw */ - zink_batch_no_rp_safe(ctx); /* this is an ideal time to oom flush since it won't split a renderpass */ if (ctx->oom_flush) flush_batch(ctx, false); -- 2.7.4