llvmpipe: Fix wrong GS invocation count when using instanced GS

Each invocation obviously counts toward the total GS invocation count.

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36686>
This commit is contained in:
Roland Scheidegger
2025-08-08 20:14:31 +02:00
committed by Marge Bot
parent c871a62a75
commit 67b90113a6
+2 -1
View File
@@ -71,6 +71,7 @@ draw_gs_get_input_index(int semantic, int index,
static inline bool
draw_gs_should_flush(struct draw_geometry_shader *shader)
{
/* TODO: should not have to switch to scalar mode for instanced GS */
return (shader->fetched_prim_count == shader->vector_length || shader->num_invocations > 1);
}
@@ -421,7 +422,7 @@ gs_flush(struct draw_geometry_shader *shader)
unsigned input_primitives = shader->fetched_prim_count;
if (shader->draw->collect_statistics) {
shader->draw->statistics.gs_invocations += input_primitives;
shader->draw->statistics.gs_invocations += input_primitives * shader->num_invocations;
}
assert(input_primitives > 0 &&