glsl: Add a helper constructor for expressions that works out result type.

This doesn't cover all expressions or all operand types, but it will
complain if you overreach and it allows for much greater slack on the
programmer's part.
This commit is contained in:
Eric Anholt
2010-11-03 10:21:07 -07:00
parent 68a4f63247
commit 6b937465d4
2 changed files with 104 additions and 0 deletions

View File

@@ -842,12 +842,14 @@ public:
* Constructor for unary operation expressions
*/
ir_expression(int op, const struct glsl_type *type, ir_rvalue *);
ir_expression(int op, ir_rvalue *);
/**
* Constructor for binary operation expressions
*/
ir_expression(int op, const struct glsl_type *type,
ir_rvalue *, ir_rvalue *);
ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1);
/**
* Constructor for quad operator expressions