From 7e2aa91507a5883e33473e0a94215ee3985baad1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 19 Jul 2010 17:12:42 -0700 Subject: glsl2: Add and use new variable mode ir_var_temporary This is quite a large patch because breaking it into smaller pieces would result in the tree being intermitently broken. The big changes are: * Add the ir_var_temporary variable mode * Change the ir_variable constructor to take the mode as a parameter and correctly specify the mode for all ir_varables. * Change the linker to not cross validate ir_var_temporary variables. * Change the linker to pull all ir_var_temporary variables from global scope into 'main'. --- src/glsl/ir_clone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/glsl/ir_clone.cpp') diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 91d6977354..f7e8794728 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -39,7 +39,8 @@ ir_variable * ir_variable::clone(struct hash_table *ht) const { void *ctx = talloc_parent(this); - ir_variable *var = new(ctx) ir_variable(type, name); + ir_variable *var = new(ctx) ir_variable(this->type, this->name, + (ir_variable_mode) this->mode); var->max_array_access = this->max_array_access; var->read_only = this->read_only; @@ -47,7 +48,6 @@ ir_variable::clone(struct hash_table *ht) const var->invariant = this->invariant; var->shader_in = this->shader_in; var->shader_out = this->shader_out; - var->mode = this->mode; var->interpolation = this->interpolation; var->array_lvalue = this->array_lvalue; var->location = this->location; -- cgit v1.2.3