diff options
author | Ian Romanick <[email protected]> | 2010-07-19 17:12:42 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-07-20 17:48:24 -0700 |
commit | 7e2aa91507a5883e33473e0a94215ee3985baad1 (patch) | |
tree | 0e88667d83141c9359eb00b50d6945b4e18c8e72 /src/glsl/ir_mod_to_fract.cpp | |
parent | 1124e5a3cbba839ffd968742bfa3295c8de5498c (diff) |
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'.
Diffstat (limited to 'src/glsl/ir_mod_to_fract.cpp')
-rw-r--r-- | src/glsl/ir_mod_to_fract.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_mod_to_fract.cpp b/src/glsl/ir_mod_to_fract.cpp index ec1e65092d9..71c9472b12b 100644 --- a/src/glsl/ir_mod_to_fract.cpp +++ b/src/glsl/ir_mod_to_fract.cpp @@ -60,7 +60,8 @@ ir_mod_to_fract_visitor::visit_leave(ir_expression *ir) if (ir->operation != ir_binop_mod) return visit_continue; - ir_variable *temp = new(ir) ir_variable(ir->operands[1]->type, "mod_b"); + ir_variable *temp = new(ir) ir_variable(ir->operands[1]->type, "mod_b", + ir_var_temporary); this->base_ir->insert_before(temp); ir_assignment *assign; |