i965/fs: Don't offset uniform registers in half().

Half gives you the second half of a SIMD16 register, but if the register
is a uniform it would incorrectly give you the next register.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
Matt Turner 2014-08-29 14:41:21 -07:00
parent c74f2db0a5
commit b5b18e4687

View file

@ -202,6 +202,10 @@ static inline fs_reg
half(fs_reg reg, unsigned idx)
{
assert(idx < 2);
if (reg.file == UNIFORM)
return reg;
assert(idx == 0 || (reg.file != HW_REG && reg.file != IMM));
assert(reg.width == 16);
reg.width = 8;