[Mesa-dev] [PATCH 2/4] i965/fs: Add a negate() function.
Matt Turner
mattst88 at gmail.com
Thu Dec 4 15:05:57 PST 2014
---
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 b29b6b0..c7bc55c 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;
--
2.0.4
More information about the mesa-dev
mailing list