i965/vs: Set brw_vs_prog_key::clamp_vertex_color to 0 when irrelevant.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 1 Dec 2014 09:09:35 +0000 (01:09 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Dec 2014 01:00:26 +0000 (17:00 -0800)
commit51f7f613f920148d5e9d1f5380da64fd55c66334
treee495e3395a8d65f9a415ae13b70689b517c43505
parentafd605f3461462ba1b9f522b079ff5a03e7ab55c
i965/vs: Set brw_vs_prog_key::clamp_vertex_color to 0 when irrelevant.

Vertex color clamping is only relevant if the shader writes to
the built-in gl_[Secondary]{Front,Back}Color varyings.  Otherwise,
brw_vs_prog_key::clamp_vertex_color is never used, so we can simply
leave it set to 0.

This enables us to correctly predict the clamp_vertex_color key value
in the precompile for shaders which don't use those varyings.

Eliminates virtually all VS recompiles in Serious Sam 3's intro.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_vs.c