i965: fix EXT_provoking_vertex support
[mesa.git] / src / mesa / drivers / dri / i965 / brw_clip_line.c
index 048ca620fabea13d9f65eff63763c1ca236b7cb2..fa9648f50f312dadfbf2dd4c4cd9a9d3d03f0d69 100644 (file)
@@ -269,8 +269,12 @@ void brw_emit_line_clip( struct brw_clip_compile *c )
    brw_clip_line_alloc_regs(c);
    brw_clip_init_ff_sync(c);
 
-   if (c->key.do_flat_shading)
-      brw_clip_copy_colors(c, 0, 1);
+   if (c->key.do_flat_shading) {
+      if (c->key.pv_first)
+         brw_clip_copy_colors(c, 1, 0);
+      else
+         brw_clip_copy_colors(c, 0, 1);
+   }
                 
    clip_and_emit_line(c);
 }