i965/nir: Use offset() instead of altering reg_offset directly.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 16 Jan 2015 21:16:18 +0000 (13:16 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Jan 2015 21:13:48 +0000 (13:13 -0800)
commit45123ee8186cff6bb819b9c9e44d6d5a1bb41923
tree22d7b5e5d3ebbbf64cda553b321d4591424fbc2e
parent3f263ffbb37d77f97a86686e1d2d5eeabf4ecae6
i965/nir: Use offset() instead of altering reg_offset directly.

offset() properly handles reg_width, so it'll work for SIMD16.

While we're in the area, simplify a few cases, and use retype() to cut a
few more lines of code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp