From fe949949a91ff10e28024ce1a80797832adb408d Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 28 Jul 2015 16:53:02 -0700 Subject: i965/fs: handle uniforms in byte_offset() v2: Do it only for uniforms (Iago) Signed-off-by: Iago Toral Quiroga Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_ir_fs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h index 1649da3e2bf..86acdb236a4 100644 --- a/src/mesa/drivers/dri/i965/brw_ir_fs.h +++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h @@ -90,10 +90,14 @@ byte_offset(fs_reg reg, unsigned delta) case MRF: reg.nr += delta / 32; break; + case UNIFORM: + reg.reg_offset += delta / 4; + reg.subreg_offset += delta % 4; + return reg; case ARF: case FIXED_GRF: case IMM: - case UNIFORM: + default: assert(delta == 0); } reg.subreg_offset += delta % 32; -- cgit v1.2.3