zink: move draw-time barrier generation down a little
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 17 Jun 2022 14:14:00 +0000 (10:14 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 20 Jun 2022 00:50:48 +0000 (00:50 +0000)
ensure that this occurs after potential rebind handling

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>

src/gallium/drivers/zink/zink_draw.cpp

index 522b41c..3aad929 100644 (file)
@@ -484,7 +484,6 @@ zink_draw(struct pipe_context *pctx,
 
    if (ctx->memory_barrier)
       zink_flush_memory_barrier(ctx, false);
-   update_barriers(ctx, false);
 
    if (unlikely(ctx->buffer_rebind_counter < screen->buffer_rebind_counter)) {
       ctx->buffer_rebind_counter = screen->buffer_rebind_counter;
@@ -535,6 +534,7 @@ zink_draw(struct pipe_context *pctx,
       }
    }
 
+   update_barriers(ctx, false);
    /* ensure synchronization between doing streamout with counter buffer
     * and using counter buffer for indirect draw
     */