i965/vs: Gen4/5: enable front colors if back colors are written
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 7 Jul 2013 11:13:07 +0000 (23:13 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 14 Jul 2013 07:58:11 +0000 (19:58 +1200)
commit1ec66f2fb2fea0497efebc1db83c75ec95a816a4
tree36cbb50d68839a8e56994f7581d0112165cb4c40
parent796b73d1feeafa7ce128273f722409ad697bfdb4
i965/vs: Gen4/5: enable front colors if back colors are written

Fixes undefined results if a back color is written, but the
corresponding front color is not, and only backfacing primitives are
drawn. Results are still undefined if a frontfacing primitive is drawn,
but that's OK.

The other reasonable way to fix this would have been to just pick
the one color slot that was populated, but that dilutes the value of
the tests.

On Gen6+, the fixed function clipper and triangle setup already take
care of this.

Fixes 11 piglits:
spec/glsl-1.10/execution/interpolation/interpolation-none-gl_Back*Color-*

NOTE: This is a candidate for stable branches.

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