diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2011-01-12 15:37:37 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2011-01-31 11:10:59 -0800 |
commit | 819d57fce94b20fa0d34da6f037f0a53c4a5bdc2 (patch) | |
tree | ea4c12c2a582e0f4a4119b4ace0bfecc5245d14b /src/glsl/opt_constant_folding.cpp | |
parent | c5a27b5939427bdc95c926b450ed3de1ff4baafb (diff) |
glsl: Introduce a new "const_in" variable mode.
This annotation is for an "in" function parameter for which it is only legal
to pass constant expressions. The only known example of this, currently,
is the textureOffset functions.
This should never be used for globals.
Diffstat (limited to 'src/glsl/opt_constant_folding.cpp')
-rw-r--r-- | src/glsl/opt_constant_folding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_constant_folding.cpp b/src/glsl/opt_constant_folding.cpp index d69ca75fe0..599b21525d 100644 --- a/src/glsl/opt_constant_folding.cpp +++ b/src/glsl/opt_constant_folding.cpp @@ -122,7 +122,7 @@ ir_constant_folding_visitor::visit_enter(ir_call *ir) ir_rvalue *param_rval = (ir_rvalue *)iter.get(); ir_variable *sig_param = (ir_variable *)sig_iter.get(); - if (sig_param->mode == ir_var_in) { + if (sig_param->mode == ir_var_in || sig_param->mode == ir_var_const_in) { ir_rvalue *new_param = param_rval; handle_rvalue(&new_param); |