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'.
This commit is contained in:
@@ -748,10 +748,12 @@ ir_swizzle::variable_referenced()
|
||||
return this->val->variable_referenced();
|
||||
}
|
||||
|
||||
ir_variable::ir_variable(const struct glsl_type *type, const char *name)
|
||||
|
||||
ir_variable::ir_variable(const struct glsl_type *type, const char *name,
|
||||
ir_variable_mode mode)
|
||||
: max_array_access(0), read_only(false), centroid(false), invariant(false),
|
||||
shader_in(false), shader_out(false),
|
||||
mode(ir_var_auto), interpolation(ir_var_smooth), array_lvalue(false)
|
||||
mode(mode), interpolation(ir_var_smooth), array_lvalue(false)
|
||||
{
|
||||
this->ir_type = ir_type_variable;
|
||||
this->type = type;
|
||||
|
Reference in New Issue
Block a user