From: Zack Rusin Date: Tue, 14 May 2013 02:41:25 +0000 (-0400) Subject: draw: use the total number of vertices for statistics X-Git-Tag: mesa-9.2.1~1180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F6598%2F1;p=platform%2Fupstream%2Fmesa.git draw: use the total number of vertices for statistics the number of vertices to fetch doesn't necessarily equal the total number of input vertices, e.g. we might want to fetch a single vertex but then draw it twice. Lets use the correct number of input vertices in the statistics. Signed-off-by: Zack Rusin Reviewed-by: José Fonseca Reviewed-by: Roland Scheidegger --- diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 400511c..ea2a5d6 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -244,7 +244,7 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, return; } if (draw->collect_statistics) { - draw->statistics.ia_vertices += fetch_info->count; + draw->statistics.ia_vertices += prim_info->count; draw->statistics.ia_primitives += u_decomposed_prims_for_vertices(prim_info->prim, fetch_info->count); draw->statistics.vs_invocations += fetch_info->count; 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 bc99c16..fa8baf3 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 @@ -339,7 +339,7 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle, } if (draw->collect_statistics) { - draw->statistics.ia_vertices += fetch_info->count; + draw->statistics.ia_vertices += prim_info->count; draw->statistics.ia_primitives += u_decomposed_prims_for_vertices(prim_info->prim, prim_info->count); draw->statistics.vs_invocations += fetch_info->count;