diff options
author | Matt Turner <[email protected]> | 2014-02-22 16:35:14 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-02-28 10:37:46 -0800 |
commit | 5eff8576ba274858a0b242ead97b8b5fc2b4f8ff (patch) | |
tree | 9f74463dd0f35c125909a950701c908d4de12398 /src/glsl | |
parent | d5fa8a956211692441b9c3ffc97b7486599ab3a3 (diff) |
glsl: Add is_horizontal() method to ir_expression.
Cc: "10.1" <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ir.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 5da61d5cfe5..ed3f086ce7a 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(); |