draw: use the prim count for ia primitives
authorZack Rusin <zackr@vmware.com>
Mon, 22 Apr 2013 23:07:14 +0000 (19:07 -0400)
committerZack Rusin <zackr@vmware.com>
Tue, 23 Apr 2013 00:36:07 +0000 (20:36 -0400)
Number of vertices to fetch doesn't always equal the number of input
vertices. To correctly compute the number if IA primitives we need
to use the total number of input vertices, not only those that
need to be fetched.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c

index 7ce845ed7daf421fc86ca4724b61759e0fd78e8c..afa5d4748db856e0bd0a1b2b0d27bebfbba22bb9 100644 (file)
@@ -337,10 +337,11 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
       assert(0);
       return;
    }
+
    if (draw->collect_statistics) {
       draw->statistics.ia_vertices += fetch_info->count;
       draw->statistics.ia_primitives +=
-         u_decomposed_prims_for_vertices(prim_info->prim, fetch_info->count);
+         u_decomposed_prims_for_vertices(prim_info->prim, prim_info->count);
       draw->statistics.vs_invocations += fetch_info->count;
    }