tu: Move tu_autotune_end_renderpass as late as possible

The tu_autotune_end_renderpass function collects timestamp data for
the renderpass and should be called as late as possible for the most
complete data.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37802>
This commit is contained in:
Dhruv Mark Collins 2025-10-09 13:56:25 +00:00
parent 4897b6d606
commit bd88997c0a

View file

@ -3191,8 +3191,6 @@ static void
tu6_sysmem_render_end(struct tu_cmd_buffer *cmd, struct tu_cs *cs,
struct tu_renderpass_result *autotune_result)
{
tu_autotune_end_renderpass<CHIP>(cmd, cs, autotune_result);
/* Do any resolves of the last subpass. These are handled in the
* tile_store_cs in the gmem path.
*/
@ -3231,6 +3229,8 @@ tu6_sysmem_render_end(struct tu_cmd_buffer *cmd, struct tu_cs *cs,
tu_cs_emit(cs, 0); /* value */
}
tu_autotune_end_renderpass<CHIP>(cmd, cs, autotune_result);
tu_cs_sanity_check(cs);
}
@ -3630,8 +3630,6 @@ static void
tu6_tile_render_end(struct tu_cmd_buffer *cmd, struct tu_cs *cs,
struct tu_renderpass_result *autotune_result)
{
tu_autotune_end_renderpass<CHIP>(cmd, cs, autotune_result);
tu_cs_emit_call(cs, &cmd->draw_epilogue_cs);
tu_lrz_tiling_end<CHIP>(cmd, cs);
@ -3660,6 +3658,8 @@ tu6_tile_render_end(struct tu_cmd_buffer *cmd, struct tu_cs *cs,
tu_emit_event_write<CHIP>(cmd, cs, FD_CCU_CLEAN_BLIT_CACHE);
tu_autotune_end_renderpass<CHIP>(cmd, cs, autotune_result);
tu_cs_sanity_check(cs);
}