summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-12-04 13:35:25 -0800
committerMatt Turner <[email protected]>2014-12-05 09:49:42 -0800
commit66cc8de042134525483444274c0161b2feaf46fa (patch)
tree80416d822b07b118b1158185455fd38fea837d94
parent15f6118b77cbe42fb997174715bce4c2548aa1f1 (diff)
i965/fs: Add a negate() function.
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h8
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;