i965 Gen4/5: Generalize SF interpolation setup for GLSL1.3
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 6 Jul 2013 13:53:45 +0000 (01:53 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 1 Aug 2013 08:58:52 +0000 (20:58 +1200)
commit21922cb70d0a2de23f6080c8b9c4324cba5a2fff
tree855e9bb73020f88609b31678f2c43440eb443f5a
parent3b5fe704e182abce581518f43ea45d1cfb76f423
i965 Gen4/5: Generalize SF interpolation setup for GLSL1.3

Previously the SF only handled the builtin color varying specially.
This patch generalizes that support to cover user-defined varyings,
driven by the interpolation mode array set up alongside the VUE map.

Based on the following patches from Olivier Galibert:
- http://lists.freedesktop.org/archives/mesa-dev/2012-July/024335.html
- http://lists.freedesktop.org/archives/mesa-dev/2012-July/024339.html

With this patch, all the GLSL 1.3 interpolation tests that do not clip
(spec/glsl-1.30/execution/interpolation/*-none.shader_test) pass.

V5: Move key.do_flat_shading to brw_sf_compile.has_flat_shading; drop
vestigial hunks.
V6: Real bools.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_sf.c
src/mesa/drivers/dri/i965/brw_sf.h
src/mesa/drivers/dri/i965/brw_sf_emit.c