set INTERP_CONSTANT when appropriate

Not really signficant now since draw_flat stage copies the provoking
vertex color to all prim verts.
This commit is contained in:
Brian 2007-07-13 12:26:09 -06:00
parent a47b5764c0
commit 5810b40d6e

View file

@ -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);
}
}