From: Matt Turner Date: Thu, 4 Dec 2014 21:35:25 +0000 (-0800) Subject: i965/fs: Add a negate() function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66cc8de042134525483444274c0161b2feaf46fa;p=mesa.git i965/fs: Add a negate() function. Reviewed-by: Jason Ekstrand --- 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 @@ -118,6 +118,14 @@ public: uint8_t stride; }; +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) {