[Mesa-dev] [PATCH 1/2] draw: use the total number of vertices for statistics

Roland Scheidegger sroland at vmware.com
Tue May 14 04:54:40 PDT 2013


Am 14.05.2013 05:09, schrieb Zack Rusin:
> 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 at vmware.com>
> ---
>  src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> 

LGTM, though is the difference to the non-llvm path now on purpose?

Roland


More information about the mesa-dev mailing list