From: Marek Olšák <marek.ol...@amd.com>

important for debugging

Cc: 18.1 18.2 <mesa-sta...@lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_gfx_cs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c 
b/src/gallium/drivers/radeonsi/si_gfx_cs.c
index c39564ecbe5..38b85ce6243 100644
--- a/src/gallium/drivers/radeonsi/si_gfx_cs.c
+++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c
@@ -126,26 +126,27 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned 
flags,
 
        /* Wait for draw calls to finish if needed. */
        if (wait_flags) {
                ctx->flags |= wait_flags;
                si_emit_cache_flush(ctx);
        }
        ctx->gfx_last_ib_is_busy = wait_flags == 0;
 
        if (ctx->current_saved_cs) {
                si_trace_emit(ctx);
-               si_log_hw_flush(ctx);
 
                /* Save the IB for debug contexts. */
                si_save_cs(ws, cs, &ctx->current_saved_cs->gfx, true);
                ctx->current_saved_cs->flushed = true;
                ctx->current_saved_cs->time_flush = os_time_get_nano();
+
+               si_log_hw_flush(ctx);
        }
 
        /* Flush the CS. */
        ws->cs_flush(cs, flags, &ctx->last_gfx_fence);
        if (fence)
                ws->fence_reference(fence, ctx->last_gfx_fence);
 
        /* This must be after cs_flush returns, since the context's API
         * thread can concurrently read this value in si_fence_finish. */
        ctx->num_gfx_cs_flushes++;
-- 
2.17.1

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

Reply via email to