summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-12 11:04:07 -0700
committerEric Anholt <[email protected]>2010-07-12 13:26:46 -0700
commit6d8a0a0aadaafbab02dffcf7f89eb0210dd37b2e (patch)
treefe424ec3226da050c072fae82816448028800595 /src/glsl/ir.h
parent5723e5bb8b73cd2a3b77d750972e3d0b4d0d0ff8 (diff)
glsl2: Add a new pass at the IR level to break down matrix ops to vector ops.
This will be used by the Mesa IR and likely most HW backends, as it allows other optimizations to occur that might not otherwise. Fixes glsl-vs-mat-sub-1, glsl-vs-mat-div-1.
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h6
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);