diff options
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 500a8c7a006..0d5bbc20aa8 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -74,6 +74,7 @@ public: virtual class ir_dereference * as_dereference() { return NULL; } virtual class ir_dereference_array * as_dereference_array() { return NULL; } virtual class ir_dereference_variable *as_dereference_variable() { return NULL; } + virtual class ir_expression * as_expression() { return NULL; } virtual class ir_rvalue * as_rvalue() { return NULL; } virtual class ir_loop * as_loop() { return NULL; } virtual class ir_assignment * as_assignment() { return NULL; } @@ -603,6 +604,11 @@ public: ir_expression(int op, const struct glsl_type *type, ir_rvalue *, ir_rvalue *); + virtual ir_expression *as_expression() + { + return this; + } + virtual ir_expression *clone(struct hash_table *ht) const; static unsigned int get_num_operands(ir_expression_operation); |