aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_derived.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c
index 34c893e396a..18dfb50e381 100644
--- a/src/mesa/pipe/softpipe/sp_state_derived.c
+++ b/src/mesa/pipe/softpipe/sp_state_derived.c
@@ -90,7 +90,11 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe )
*/
for (i = 1; i < FRAG_ATTRIB_TEX0; i++) {
if (inputsRead & (i << i)) {
- EMIT_ATTR(frag_to_vf[i], i, INTERP_LINEAR);
+ if (softpipe->setup.flatshade
+ && (i == FRAG_ATTRIB_COL0 || i == FRAG_ATTRIB_COL1))
+ EMIT_ATTR(frag_to_vf[i], i, INTERP_CONSTANT);
+ else
+ EMIT_ATTR(frag_to_vf[i], i, INTERP_LINEAR);
}
}