diff options
author | Iago Toral Quiroga <[email protected]> | 2016-09-27 12:23:44 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2016-10-19 11:48:21 +0200 |
commit | 66d8bd3b7e577b7ae4d0b29186dce95d615e2c40 (patch) | |
tree | a9d0ad3adfeca0a75c1c296319f124ab8dc8bffa /src/mesa/drivers/dri/i965/brw_reg.h | |
parent | 86c4575a813bb57d1af3e3a0bb0c3eb44f27aedf (diff) |
i965: fix subnr overflow in suboffset()
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_reg.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_reg.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index 3b46d27fcd2..8907c9c5c60 100644 --- a/src/mesa/drivers/dri/i965/brw_reg.h +++ b/src/mesa/drivers/dri/i965/brw_reg.h @@ -520,14 +520,6 @@ sechalf(struct brw_reg reg) } static inline struct brw_reg -suboffset(struct brw_reg reg, unsigned delta) -{ - reg.subnr += delta * type_sz(reg.type); - return reg; -} - - -static inline struct brw_reg offset(struct brw_reg reg, unsigned delta) { reg.nr += delta; @@ -544,6 +536,11 @@ byte_offset(struct brw_reg reg, unsigned bytes) return reg; } +static inline struct brw_reg +suboffset(struct brw_reg reg, unsigned delta) +{ + return byte_offset(reg, delta * type_sz(reg.type)); +} /** Construct unsigned word[16] register */ static inline struct brw_reg |