From 80fa8304c807b2ef28bf9e37bdd7afadfde216ce Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 10 Apr 2020 14:35:24 +1000 Subject: [PATCH] draw: fix tessellation stats query Reviewed-by: Roland Scheidegger Part-of: --- .../auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index f9db2928582..d403e81c224 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -596,8 +596,11 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle, if (draw->collect_statistics) { draw->statistics.ia_vertices += prim_info->count; - draw->statistics.ia_primitives += - u_decomposed_prims_for_vertices(prim_info->prim, prim_info->count); + if (prim_info->prim == PIPE_PRIM_PATCHES) + draw->statistics.ia_primitives += prim_info->count / draw->pt.vertices_per_patch; + else + draw->statistics.ia_primitives += + u_decomposed_prims_for_vertices(prim_info->prim, prim_info->count); draw->statistics.vs_invocations += fetch_info->count; } -- 2.30.2