From: Dave Airlie Date: Fri, 10 Apr 2020 04:35:24 +0000 (+1000) Subject: draw: fix tessellation stats query X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80fa8304c807b2ef28bf9e37bdd7afadfde216ce;p=mesa.git draw: fix tessellation stats query Reviewed-by: Roland Scheidegger Part-of: --- 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; }