From 66cc8de042134525483444274c0161b2feaf46fa Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 4 Dec 2014 13:35:25 -0800 Subject: [PATCH] i965/fs: Add a negate() function. Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_fs.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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) { -- 2.30.2