diff options
author | Zack Rusin <[email protected]> | 2013-04-18 03:03:14 -0700 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-04-18 11:37:37 -0700 |
commit | e4752d0f56b90a5565936b1e05bb48edb1baa3ac (patch) | |
tree | 5612534637fff5f4728fc718754fbbb1377f7fe8 /src/gallium/auxiliary/util | |
parent | c1299204adc2c926b0ab089e3d49cae64688d39d (diff) |
util/prim: fix decomposed counts for adjacency primitives
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_prim.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h index 99bb66c9b89..507d12e8096 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: |