diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index b5607121ec9..bc1843e56a3 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -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 diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index cd19f275cdc..d362b5ba1fc 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -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 + * jobs present in the batch. + */ + uint32_t draw_count; }; /* Functions for managing the above */