summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_variable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir_variable.cpp')
-rw-r--r--src/glsl/ir_variable.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glsl/ir_variable.cpp b/src/glsl/ir_variable.cpp
index 4593c181127..700c5de648d 100644
--- a/src/glsl/ir_variable.cpp
+++ b/src/glsl/ir_variable.cpp
@@ -39,9 +39,8 @@ add_variable(const char *name, enum ir_variable_mode mode, int slot,
const glsl_type *type, exec_list *instructions,
glsl_symbol_table *symtab)
{
- ir_variable *var = new(symtab) ir_variable(type, name);
+ ir_variable *var = new(symtab) ir_variable(type, name, mode);
- var->mode = mode;
switch (var->mode) {
case ir_var_auto:
var->read_only = true;