i965/fs: Don't try to use bogus interpolation modes pre-Gen6.
authorChris Forbes <chrisf@ijw.co.nz>
Fri, 26 Apr 2013 23:00:46 +0000 (11:00 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 29 Apr 2013 18:50:16 +0000 (06:50 +1200)
commit79f786f9367e0071916e1d3c25bfff00d114339c
treeea3a9b0a2d773e902e40fb45ec4b04adecdfb1e2
parenta8eed0299df3b233a80031ebe86cac785458eade
i965/fs: Don't try to use bogus interpolation modes pre-Gen6.

Interpolation modes other than perspective-barycentric-pixel-center (and
their associated coefficients in the WM payload) only exist in Gen6 and
later.

Unfortunately, if a varying was declared as `centroid`, we would blindly
read the nonexistant values, and so produce all manner of bad behavior
-- texture swimming, snow, etc.

Fixes rendering in Counter-Strike Source and Team Fortress 2 on
Ironlake.

NOTE: This is a candidate for the 9.1 branch.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp