summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup_tri.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-05-05 13:52:05 -0600
committerBrian Paul <brianp@vmware.com>2010-05-05 18:19:30 -0600
commit246d39059e21bdc840128d448bcd79a957bbd1d1 (patch)
treea7feadd76b2ba5e2238cc27c04fd3129d2b7955e /src/gallium/drivers/llvmpipe/lp_setup_tri.c
parentcb136a93aba4dc64db7e446b0fbc36c9172e4017 (diff)
llvmpipe: update driver's provoking vertex code
Note that the lp_setup_vbuf.c code is very, very similar to the corresponding code in softpipe. It could probably be shared.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index f8a5816573..53b91690b6 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -205,8 +205,14 @@ static void setup_tri_coefficients( struct lp_setup_context *setup,
switch (setup->fs.input[slot].interp) {
case LP_INTERP_CONSTANT:
- for (i = 0; i < NUM_CHANNELS; i++)
- constant_coef(setup, tri, slot+1, v3[vert_attr][i], i);
+ if (setup->flatshade_first) {
+ for (i = 0; i < NUM_CHANNELS; i++)
+ constant_coef(setup, tri, slot+1, v1[vert_attr][i], i);
+ }
+ else {
+ for (i = 0; i < NUM_CHANNELS; i++)
+ constant_coef(setup, tri, slot+1, v3[vert_attr][i], i);
+ }
break;
case LP_INTERP_LINEAR: