draw: fix first provoking vertex mode for unfilled quads
authorBrian Paul <brianp@vmware.com>
Fri, 19 Jun 2009 04:47:46 +0000 (22:47 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 19 Jun 2009 04:47:46 +0000 (22:47 -0600)
src/gallium/auxiliary/draw/draw_pt_vcache.c

index 5d268a222643ce11c1997bac07808c292562df4b..edb2aa73e162e95e082c17f3a0e1fc2775e8e1ad 100644 (file)
@@ -193,16 +193,30 @@ vcache_ef_quad( struct vcache_frontend *vcache,
                 unsigned i2,
                 unsigned i3 )
 {
-   vcache_triangle_flags( vcache,
-                          ( DRAW_PIPE_RESET_STIPPLE |
-                            DRAW_PIPE_EDGE_FLAG_0 |
-                            DRAW_PIPE_EDGE_FLAG_2 ),
-                          i0, i1, i3 );
-
-   vcache_triangle_flags( vcache,
-                          ( DRAW_PIPE_EDGE_FLAG_0 |
-                            DRAW_PIPE_EDGE_FLAG_1 ),
-                          i1, i2, i3 );
+   if (vcache->draw->rasterizer->flatshade_first) {
+      vcache_triangle_flags( vcache,
+                             ( DRAW_PIPE_RESET_STIPPLE |
+                               DRAW_PIPE_EDGE_FLAG_0 |
+                               DRAW_PIPE_EDGE_FLAG_1 ),
+                             i0, i1, i2 );
+
+      vcache_triangle_flags( vcache,
+                             ( DRAW_PIPE_EDGE_FLAG_2 |
+                               DRAW_PIPE_EDGE_FLAG_1 ),
+                             i0, i2, i3 );
+   }
+   else {
+      vcache_triangle_flags( vcache,
+                             ( DRAW_PIPE_RESET_STIPPLE |
+                               DRAW_PIPE_EDGE_FLAG_0 |
+                               DRAW_PIPE_EDGE_FLAG_2 ),
+                             i0, i1, i3 );
+
+      vcache_triangle_flags( vcache,
+                             ( DRAW_PIPE_EDGE_FLAG_0 |
+                               DRAW_PIPE_EDGE_FLAG_1 ),
+                             i1, i2, i3 );
+   }
 }
 
 /* At least for now, we're back to using a template include file for