i965: fix the constant interp bitmask for flat mode
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 6 Sep 2011 01:29:37 +0000 (09:29 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 23 Sep 2011 02:49:42 +0000 (10:49 +0800)
commitcd6b8421cac2df89dc6365ce368232e461caffcd
treeb99a87fa34c4d3625f194c11b10730a45ee1f51a
parente3c94fac4eb159f8c35798d1ad7515a40f5a2eca
i965: fix the constant interp bitmask for flat mode

Fix the constant interpolation enable bit mask for flat light mode.
FRAG_BIT_COL0 attribute bit might be 0, in which case we need to
shift one more bit right.

This would fix the oglc specularColor test fail on both Sandybridge and
Ivybridge.

v2: move the constant interp bitmask setup code into for(; attr <
FRAG_ATTRIB_MAX; attr++) loop suggested by Eric.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/mesa/drivers/dri/i965/gen6_sf_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c