diff options
author | Brian <[email protected]> | 2007-07-13 12:26:09 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-07-13 12:26:09 -0600 |
commit | 5810b40d6e9aae6b184879a99c67f83107fc6637 (patch) | |
tree | 261b243abb80bf1aa1f14042a6143191fb15e35c /src/mesa/pipe | |
parent | a47b5764c0d801fb9fc23ee80c698ff042006cb6 (diff) |
set INTERP_CONSTANT when appropriate
Not really signficant now since draw_flat stage copies the provoking
vertex color to all prim verts.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_state_derived.c | 6 |
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); } } |