From 5810b40d6e9aae6b184879a99c67f83107fc6637 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 13 Jul 2007 12:26:09 -0600 Subject: [PATCH] set INTERP_CONSTANT when appropriate Not really signficant now since draw_flat stage copies the provoking vertex color to all prim verts. --- src/mesa/pipe/softpipe/sp_state_derived.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } } -- 2.30.2