summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_setup.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index e5be65242d..5a0715ea5c 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -507,6 +507,8 @@ static void print_vertex(const struct setup_context *setup,
#endif
/**
+ * Sort the vertices from top to bottom order, setting up the triangle
+ * edge fields (ebot, emaj, etop).
* \return FALSE if coords are inf/nan (cull the tri), TRUE otherwise
*/
static boolean setup_sort_vertices( struct setup_context *setup,
@@ -1052,7 +1054,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;