From 276b9b13cf4d073c8a6faa18f41952d2f826679d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 20 Oct 2023 17:54:34 -0400 Subject: [PATCH] radeonsi: initialize perfetto in the right place Compute contexts don't execute the second half of the function. Fixes: a164e147e91 - radeonsi: Add perfetto support in radeonsi Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10043 Tested-by: Mike Lothian Tested-by: Karol Herbst Part-of: --- 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 567b8d1f2c8..9478e58035e 100644 --- a/src/gallium/drivers/radeonsi/si_gfx_cs.c +++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c @@ -369,6 +369,8 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs) if (!first_cs) u_trace_fini(&ctx->trace); + u_trace_init(&ctx->trace, &ctx->ds.trace_context); + if (unlikely(radeon_uses_secure_bos(ctx->ws))) { is_secure = ctx->ws->cs_is_secure(&ctx->gfx_cs); @@ -583,7 +585,6 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs) assert(!ctx->gfx_cs.prev_dw); ctx->initial_gfx_cs_size = ctx->gfx_cs.current.cdw; - u_trace_init(&ctx->trace, &ctx->ds.trace_context); /* All buffer references are removed on a flush, so si_check_needs_implicit_sync * cannot determine if si_make_CB_shader_coherent() needs to be called. * ctx->force_cb_shader_coherent will be cleared by the first call to