i965/fs: Add a negate() function.
authorMatt Turner <mattst88@gmail.com>
Thu, 4 Dec 2014 21:35:25 +0000 (13:35 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 5 Dec 2014 17:49:42 +0000 (09:49 -0800)
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs.h

index b29b6b0..c7bc55c 100644 (file)
@@ -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;