From: Matt Turner Date: Fri, 29 Aug 2014 21:41:21 +0000 (-0700) Subject: i965/fs: Don't offset uniform registers in half(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5b18e46877d16877053c68e013c8217bb6a7b83;p=mesa.git 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 --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 2e6296d4f23..b29b6b09bbe 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -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;