From dfa725cedeb0b6421dcfd4bf06bbc1653ad5cea2 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 6 Mar 2025 14:28:27 +0100 Subject: [PATCH] radeonsi: guard perfetto support with ifdef in si_draw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 8ac628616bc..3151ecc0cec 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -2085,8 +2085,10 @@ static void si_draw(struct pipe_context *ctx, si_need_gfx_cs_space(sctx, num_draws, ALT_HIZ_LOGIC ? 8 : 0); +#ifdef HAVE_PERFETTO if (unlikely(sctx->perfetto_enabled)) trace_si_begin_draw(&sctx->trace); +#endif unsigned instance_count = info->instance_count; @@ -2437,10 +2439,12 @@ static void si_draw(struct pipe_context *ctx, zstex->depth_cleared_level_mask &= ~BITFIELD_BIT(sctx->framebuffer.state.zsbuf->u.tex.level); } +#ifdef HAVE_PERFETTO if (unlikely(sctx->perfetto_enabled)) { /* Just use the draw[0] vertex count for perfetto. */ trace_si_end_draw(&sctx->trace, draws[0].count); } +#endif DRAW_CLEANUP; }