Module: Mesa
Branch: main
Commit: 22fb4578a089d83be56fc4282f28a8ecd332cefe
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=22fb4578a089d83be56fc4282f28a8ecd332cefe

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Mar 15 14:04:32 2023 -0400

zink: end rp earlier in set_framebuffer_state

this way any barriers occuring from unbinds won't have to do rp calc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>

---

 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 463065f00d0..b59bd107b5c 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);

Reply via email to