From: Brian Date: Fri, 13 Jul 2007 18:26:09 +0000 (-0600) Subject: set INTERP_CONSTANT when appropriate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5810b40d6e9aae6b184879a99c67f83107fc6637;p=mesa.git set INTERP_CONSTANT when appropriate Not really signficant now since draw_flat stage copies the provoking vertex color to all prim verts. --- 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); } }