Mesa (master): glsl: Add is_horizontal() method to ir_expression.
Matt Turner
mattst88 at kemper.freedesktop.org
Fri Feb 28 18:39:37 UTC 2014
Module: Mesa
Branch: master
Commit: 5eff8576ba274858a0b242ead97b8b5fc2b4f8ff
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5eff8576ba274858a0b242ead97b8b5fc2b4f8ff
Author: Matt Turner <mattst88 at gmail.com>
Date: Sat Feb 22 16:35:14 2014 -0800
glsl: Add is_horizontal() method to ir_expression.
Cc: "10.1" <mesa-stable at lists.freedesktop.org>
---
src/glsl/ir.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 5da61d5..ed3f086 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1459,6 +1459,18 @@ public:
}
/**
+ * Return whether the expression operates on vectors horizontally.
+ */
+ bool is_horizontal() const
+ {
+ return operation == ir_binop_all_equal ||
+ operation == ir_binop_any_nequal ||
+ operation == ir_unop_any ||
+ operation == ir_binop_dot ||
+ operation == ir_quadop_vector;
+ }
+
+ /**
* Return a string representing this expression's operator.
*/
const char *operator_string();
More information about the mesa-commit
mailing list