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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user