softpipe: implement flatshade_first for line setup
authorBrian Paul <brianp@vmware.com>
Wed, 10 Jun 2009 03:51:29 +0000 (21:51 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 10 Jun 2009 03:51:29 +0000 (21:51 -0600)
src/gallium/drivers/softpipe/sp_setup.c

index c6844a26498dfc119aa349ff9dab0a2a23bbe677..7d248186fde34310706e5aeb0f5f042bd75a3709 100644 (file)
@@ -1051,7 +1051,10 @@ setup_line_coefficients(struct setup_context *setup,
    float area;
 
    /* use setup->vmin, vmax to point to vertices */
-   setup->vprovoke = v1;
+   if (softpipe->rasterizer->flatshade_first)
+      setup->vprovoke = v0;
+   else
+      setup->vprovoke = v1;
    setup->vmin = v0;
    setup->vmax = v1;