aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index 059de2ec8c6..b738498c56b 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -256,7 +256,14 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
batch->num_draws++;
- prims = u_reduced_prims_for_vertices(info->mode, info->count);
+ /* Counting prims in sw doesn't work for GS and tesselation. For older
+ * gens we don't have those stages and don't have the hw counters enabled,
+ * so keep the count accurate for non-patch geometry.
+ */
+ if (info->mode != PIPE_PRIM_PATCHES)
+ prims = u_reduced_prims_for_vertices(info->mode, info->count);
+ else
+ prims = 0;
ctx->stats.draw_calls++;