draw: Fix draw_pt_split_prim for primitives with adjacency.
authorChia-I Wu <olv@lunarg.com>
Fri, 6 Aug 2010 14:50:09 +0000 (22:50 +0800)
committerChia-I Wu <olv@lunarg.com>
Fri, 6 Aug 2010 18:16:50 +0000 (02:16 +0800)
Some primitives with adjacency have their "incr" wrong.

src/gallium/auxiliary/draw/draw_pt_util.c

index 3236d38e6abdbee11b347b294e1dc87bf25f4006..182a597cca2302dbc9e884cfd9928e414261cbb0 100644 (file)
@@ -53,7 +53,7 @@ void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr)
       break;
    case PIPE_PRIM_LINES_ADJACENCY:
       *first = 4;
-      *incr = 2;
+      *incr = 4;
       break;
    case PIPE_PRIM_LINE_STRIP_ADJACENCY:
       *first = 4;
@@ -65,7 +65,7 @@ void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr)
       break;
    case PIPE_PRIM_TRIANGLES_ADJACENCY:
       *first = 6;
-      *incr = 3;
+      *incr = 6;
       break;
    case PIPE_PRIM_TRIANGLE_STRIP:
    case PIPE_PRIM_TRIANGLE_FAN:
@@ -75,7 +75,7 @@ void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr)
       break;
    case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY:
       *first = 6;
-      *incr = 1;
+      *incr = 2;
       break;
    case PIPE_PRIM_QUADS:
       *first = 4;