From 6ffcb2f47e405e2d713ed98abf83f54bf1aeb8ec Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 7 Jan 2026 11:06:06 +0100 Subject: [PATCH] radeonsi/sqtt: retrieve sqtt data after the flush ended MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow to use a staging buffer to copy the sqtt data without moving away the BO from VRAM (without this change, the vram->staging copy won't be executed since we're in the middle of a flush). Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_gfx_cs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);