diff options
Diffstat (limited to 'mesalib/src/glsl/ir.cpp')
-rw-r--r-- | mesalib/src/glsl/ir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp index ef7300e65..a5eca5a51 100644 --- a/mesalib/src/glsl/ir.cpp +++ b/mesalib/src/glsl/ir.cpp @@ -1326,9 +1326,11 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name, this->type = type; this->name = ralloc_strdup(this, name); this->explicit_location = false; + this->has_initializer = false; this->location = -1; this->warn_extension = NULL; this->constant_value = NULL; + this->constant_initializer = NULL; this->origin_upper_left = false; this->pixel_center_integer = false; this->depth_layout = ir_depth_layout_none; @@ -1489,6 +1491,9 @@ steal_memory(ir_instruction *ir, void *new_ctx) if (var != NULL && var->constant_value != NULL) steal_memory(var->constant_value, ir); + if (var != NULL && var->constant_initializer != NULL) + steal_memory(var->constant_initializer, ir); + /* The components of aggregate constants are not visited by the normal * visitor, so steal their values by hand. */ |