From: Connor Abbott Date: Tue, 28 Jul 2015 23:53:02 +0000 (-0700) Subject: i965/fs: handle uniforms in byte_offset() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe949949a91ff10e28024ce1a80797832adb408d;p=mesa.git 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 --- 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;