diff options
Diffstat (limited to 'src/compiler/glsl/lower_packed_varyings.cpp')
-rw-r--r-- | src/compiler/glsl/lower_packed_varyings.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp index 1e8cf113273..19bbe576a69 100644 --- a/src/compiler/glsl/lower_packed_varyings.cpp +++ b/src/compiler/glsl/lower_packed_varyings.cpp @@ -639,8 +639,12 @@ lower_packed_varyings_visitor::get_packed_varying_deref( * first time we visit each component. */ if (this->gs_input_vertices == 0 || vertex_index == 0) { - ralloc_asprintf_append((char **) &this->packed_varyings[slot]->name, - ",%s", name); + ir_variable *var = this->packed_varyings[slot]; + + if (var->is_name_ralloced()) + ralloc_asprintf_append((char **) &var->name, ",%s", name); + else + var->name = ralloc_asprintf(var, "%s,%s", var->name, name); } } |