From: Francisco Jerez Date: Wed, 7 Sep 2016 20:41:08 +0000 (-0700) Subject: i965/fs: Handle fixed HW GRF subnr in reg_offset(). X-Git-Tag: upstream/17.1.0~6358 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=937373eb25c53b0803e526b7b273afc2b3330752;p=platform%2Fupstream%2Fmesa.git i965/fs: Handle fixed HW GRF subnr in reg_offset(). This will be useful later on when we start using reg_offset() on fixed hardware registers. Reviewed-by: Iago Toral Quiroga --- diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h index 2e5c8e5..4ac9baa 100644 --- a/src/mesa/drivers/dri/i965/brw_ir_fs.h +++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h @@ -187,7 +187,8 @@ static inline unsigned reg_offset(const fs_reg &r) { return (r.file == VGRF || r.file == IMM ? 0 : r.nr) * - (r.file == UNIFORM ? 4 : REG_SIZE) + r.offset; + (r.file == UNIFORM ? 4 : REG_SIZE) + r.offset + + (r.file == ARF || r.file == FIXED_GRF ? r.subnr : 0); } /**