aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-03 11:52:40 -0700
committerKenneth Graunke <[email protected]>2013-09-09 11:52:22 -0700
commit7f0f60cd840fc88f01b8f6e46cad36c36709d813 (patch)
tree98b193c077baebd74715af2e6fdcacd4e2642030 /src/glsl/ir.h
parent183f7a3e6f45a3351b86eb4c25313efe140e9793 (diff)
glsl: Add an ir_expression triop constructor with type inference.
We already have ir_expression constructors for unary and binary operations, which automatically infer the type based on the opcode and operand types. These are convenient and also required for ir_builder support. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index de41858764c..0646e6d754c 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1252,6 +1252,11 @@ public:
*/
ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1);
+ /**
+ * Constructor for ternary operation expressions
+ */
+ ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1, ir_rvalue *op2);
+
virtual ir_expression *as_expression()
{
return this;