Module: Mesa
Branch: master
Commit: 3c3764f7df5ebc986657df97f06e78d990d888bf
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c3764f7df5ebc986657df97f06e78d990d888bf

Author: Mike Blumenkrantz <michael.blumenkra...@gmail.com>
Date:   Tue Aug 11 18:36:52 2020 -0400

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 <airl...@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662>

---

 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

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to