[Mesa-dev] [PATCH 1/2] util/prim: fix decomposed counts for adjacency primitives
Jose Fonseca
jfonseca at vmware.com
Fri Apr 19 00:07:34 PDT 2013
----- Original Message -----
>
> Signed-off-by: Zack Rusin <zackr at vmware.com>
> ---
> src/gallium/auxiliary/util/u_prim.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_prim.h
> b/src/gallium/auxiliary/util/u_prim.h
> index 99bb66c..507d12e 100644
> --- a/src/gallium/auxiliary/util/u_prim.h
> +++ b/src/gallium/auxiliary/util/u_prim.h
> @@ -190,13 +190,13 @@ u_decomposed_prims_for_vertices(int primitive, int
> vertices)
> case PIPE_PRIM_TRIANGLE_FAN:
> return (vertices > 2) ? vertices - 2 : 0;
> case PIPE_PRIM_LINES_ADJACENCY:
> - return vertices / 2;
> + return vertices / 4;
> case PIPE_PRIM_LINE_STRIP_ADJACENCY:
> - return (vertices > 1) ? vertices - 1 : 0;
> + return (vertices > 3) ? vertices - 3 : 0;
> case PIPE_PRIM_TRIANGLES_ADJACENCY:
> - return vertices / 3;
> + return vertices / 6;
> case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
> - return (vertices > 2) ? vertices - 2 : 0;
> + return (vertices > 5) ? 1 + (vertices - 6)/2 : 0;
> case PIPE_PRIM_QUADS:
> return vertices / 4;
> case PIPE_PRIM_QUAD_STRIP:
> --
> 1.7.10.4
>
>
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
More information about the mesa-dev
mailing list