diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c index 42e91e26cc2..cec992ffd16 100644 --- a/src/gallium/drivers/radeonsi/si_gfx_cs.c +++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c @@ -219,10 +219,6 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned flags, struct pipe_fence_h si_check_vm_faults(ctx, &ctx->current_saved_cs->gfx); } - if (unlikely(ctx->sqtt && (flags & PIPE_FLUSH_END_OF_FRAME))) { - si_handle_sqtt(ctx, &ctx->gfx_cs); - } - if (ctx->current_saved_cs) si_saved_cs_reference(&ctx->current_saved_cs, NULL); @@ -232,6 +228,10 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned flags, struct pipe_fence_h si_begin_new_gfx_cs(ctx, false); ctx->gfx_flush_in_progress = false; + if (unlikely(ctx->sqtt && (flags & PIPE_FLUSH_END_OF_FRAME))) { + si_handle_sqtt(ctx, &ctx->gfx_cs); + } + #if SHADER_DEBUG_LOG if (debug_get_bool_option("shaderlog", false)) si_dump_debug_log(ctx, false);