draw: use the total number of vertices for statistics
authorZack Rusin <zackr@vmware.com>
Tue, 14 May 2013 02:41:25 +0000 (22:41 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 14 May 2013 07:10:33 +0000 (03:10 -0400)
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 <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c

index 400511cee4afc77c87c7eb14e286a9009478738c..ea2a5d68e39f043654d82ec0071e7acca49d3a11 100644 (file)
@@ -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;
index bc99c169deb1e28a4ca80f8cf2a5a64b73838af2..fa8baf38889d5dcf414387cee211ea7d130b8126 100644 (file)
@@ -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;