Module: Mesa Branch: master Commit: b5b18e46877d16877053c68e013c8217bb6a7b83 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5b18e46877d16877053c68e013c8217bb6a7b83
Author: Matt Turner <[email protected]> Date: Fri Aug 29 14:41:21 2014 -0700 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 <[email protected]> --- 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 2e6296d..b29b6b0 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; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
