Mesa (master): i965/fs: Add a negate() function.

Matt Turner mattst88 at kemper.freedesktop.org
Fri Dec 5 17:50:08 UTC 2014


Module: Mesa
Branch: master
Commit: 66cc8de042134525483444274c0161b2feaf46fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=66cc8de042134525483444274c0161b2feaf46fa

Author: Matt Turner <mattst88 at gmail.com>
Date:   Thu Dec  4 13:35:25 2014 -0800

i965/fs: Add a negate() function.

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

---

 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;




More information about the mesa-commit mailing list