aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_algebraic.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-02-28 17:49:20 -0800
committerMatt Turner <[email protected]>2014-06-19 16:11:51 -0700
commitf043971097f2c707c3104845066ad2cc72f65708 (patch)
treefc6d024a2c29fdfa303f5f8f64405d729f27bc63 /src/glsl/opt_algebraic.cpp
parent1d9f74eda75da05b4d5c7df5fc1e6f5ab8d88322 (diff)
glsl: Pass in options to do_algebraic().
Will be used in the next commit. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/opt_algebraic.cpp')
-rw-r--r--src/glsl/opt_algebraic.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 9d553925207..d57c3e8bde4 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic.cpp
@@ -45,7 +45,9 @@ namespace {
class ir_algebraic_visitor : public ir_rvalue_visitor {
public:
- ir_algebraic_visitor(bool native_integers)
+ ir_algebraic_visitor(bool native_integers,
+ const struct gl_shader_compiler_options *options)
+ : options(options)
{
this->progress = false;
this->mem_ctx = NULL;
@@ -69,6 +71,7 @@ public:
ir_rvalue *swizzle_if_required(ir_expression *expr,
ir_rvalue *operand);
+ const struct gl_shader_compiler_options *options;
void *mem_ctx;
bool native_integers;
@@ -380,6 +383,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
}
}
}
+
break;
case ir_binop_sub:
@@ -647,9 +651,10 @@ ir_algebraic_visitor::handle_rvalue(ir_rvalue **rvalue)
}
bool
-do_algebraic(exec_list *instructions, bool native_integers)
+do_algebraic(exec_list *instructions, bool native_integers,
+ const struct gl_shader_compiler_options *options)
{
- ir_algebraic_visitor v(native_integers);
+ ir_algebraic_visitor v(native_integers, options);
visit_list_elements(&v, instructions);