diff options
author | Matt Turner <[email protected]> | 2014-12-04 13:35:25 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-05 09:49:42 -0800 |
commit | 66cc8de042134525483444274c0161b2feaf46fa (patch) | |
tree | 80416d822b07b118b1158185455fd38fea837d94 /src/mesa | |
parent | 15f6118b77cbe42fb997174715bce4c2548aa1f1 (diff) |
i965/fs: Add a negate() function.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index b29b6b09bbe..c7bc55cb929 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -119,6 +119,14 @@ public: }; static inline fs_reg +negate(fs_reg reg) +{ + assert(reg.file != HW_REG && reg.file != IMM); + reg.negate = !reg.negate; + return reg; +} + +static inline fs_reg retype(fs_reg reg, enum brw_reg_type type) { reg.fixed_hw_reg.type = reg.type = type; |