Module: Mesa Branch: main Commit: 276b9b13cf4d073c8a6faa18f41952d2f826679d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=276b9b13cf4d073c8a6faa18f41952d2f826679d
Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Oct 20 17:54:34 2023 -0400 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 <m...@fireburn.co.uk> Tested-by: Karol Herbst <kher...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25873> --- 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