Module: Mesa
Branch: ext-provoking-vertex
Commit: 950171be3c8032d590fde3247bf12992aa9139c8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=950171be3c8032d590fde3247bf12992aa9139c8

Author: Brian Paul <[email protected]>
Date:   Thu Jun 18 22:47:46 2009 -0600

draw: fix first provoking vertex mode for unfilled quads

---

 src/gallium/auxiliary/draw/draw_pt_vcache.c |   34 +++++++++++++++++++--------
 1 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache.c 
b/src/gallium/auxiliary/draw/draw_pt_vcache.c
index 5d268a2..edb2aa7 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vcache.c
+++ b/src/gallium/auxiliary/draw/draw_pt_vcache.c
@@ -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

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to