panfrost: Count draws at the batch level

This way we have a HW-agnostic way to know how many draws were issued,
instead of looking into the job chain builder guts.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26249>
This commit is contained in:
Boris Brezillon 2023-11-14 13:36:51 +01:00 committed by Marge Bot
parent 948062ee84
commit 539e5e435c
2 changed files with 7 additions and 0 deletions

View file

@ -3700,6 +3700,7 @@ panfrost_direct_draw(struct panfrost_batch *batch,
panfrost_emit_vertex_tiler_jobs(batch, &vertex, &tiler);
}
#endif
batch->draw_count++;
}
static bool

View file

@ -189,6 +189,12 @@ struct panfrost_batch {
*/
struct pan_tristate sprite_coord_origin;
struct pan_tristate first_provoking_vertex;
/* Number of effective draws in the batch. Draws with rasterization disabled
* don't count as effective draws. It's basically the number of IDVS or
* <vertex,tiler> jobs present in the batch.
*/
uint32_t draw_count;
};
/* Functions for managing the above */