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. --- src/mesa/drivers/dri/i965/brw_fs.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 6a7fbe4..71b82ae 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -210,6 +210,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; -- 2.0.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev