util/prim: fix primitive trimming for triangles with adjacency
authorChia-I Wu <olvaffe@gmail.com>
Thu, 2 May 2013 03:25:39 +0000 (11:25 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Fri, 3 May 2013 03:39:12 +0000 (11:39 +0800)
Fix for PIPE_PRIM_TRIANGLES_ADJACENCY and PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Zack Rusin <zackr@vmware.com>
src/gallium/auxiliary/util/u_prim.h

index e4774442c819c611082b4f7fc279bb7c957a0858..31f92352ee3eba6f4850aa461361ebbe05f30c33 100644 (file)
@@ -91,8 +91,8 @@ static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr )
       { 3, 0 }, /* PIPE_PRIM_TRIANGLE_POLYGON */
       { 4, 4 }, /* PIPE_PRIM_LINES_ADJACENCY */
       { 4, 0 }, /* PIPE_PRIM_LINE_STRIP_ADJACENCY */
-      { 6, 5 }, /* PIPE_PRIM_TRIANGLES_ADJACENCY */
-      { 4, 0 }, /* PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY */
+      { 6, 6 }, /* PIPE_PRIM_TRIANGLES_ADJACENCY */
+      { 6, 2 }, /* PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY */
    };
 
    if (unlikely(pipe_prim >= PIPE_PRIM_MAX)) {