i965/fs: Fix passing an immediate to half().

Immediates are generally uniform, they yield the same value to both
halves of any instruction.

Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Francisco Jerez 2015-04-22 15:01:24 +03:00 committed by Jason Ekstrand
parent 5b2d3480f5
commit 88414de45e

View file

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