tu/u_trace: Correct the order of tracepoints clonning for binning

Otherwise we'd get tracepoints out of logical order, which doesn't
matter for perfetto at the moment, but would matter with future
perf warnings.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41102>
This commit is contained in:
Danylo Piliaiev 2026-04-16 14:56:10 +02:00 committed by Marge Bot
parent 50cc9c723c
commit 6e8ec44287

View file

@ -2706,13 +2706,13 @@ tu6_emit_binning_pass(struct tu_cmd_buffer *cmd, struct tu_cs *cs,
/* emit IB to binning drawcmds: */
tu_cs_emit_call(cs, &cmd->draw_cs);
tu_clone_trace_range<CHIP>(cmd, cs, &cmd->trace, cmd->trace_renderpass_start, u_trace_end_iterator(&cmd->rp_trace));
if (use_cb)
trace_end_concurrent_binning_ib(&cmd->trace, cs);
else
trace_end_binning_ib(&cmd->trace, cs);
tu_clone_trace_range<CHIP>(cmd, cs, &cmd->trace, cmd->trace_renderpass_start, u_trace_end_iterator(&cmd->rp_trace));
/* switching from binning pass to GMEM pass will cause a switch from
* PROGRAM_BINNING to PROGRAM, which invalidates const state (XS_CONST states)
* so make sure these states are re-emitted