summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/nir/nir_lower_outputs_to_temporaries.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_lower_outputs_to_temporaries.c b/src/glsl/nir/nir_lower_outputs_to_temporaries.c
index b730cad0020..4ea5fd4f66b 100644
--- a/src/glsl/nir/nir_lower_outputs_to_temporaries.c
+++ b/src/glsl/nir/nir_lower_outputs_to_temporaries.c
@@ -91,6 +91,9 @@ nir_lower_outputs_to_temporaries(nir_shader *shader)
/* The orignal is now the temporary */
nir_variable *temp = var;
+ /* Reparent the name to the new variable */
+ ralloc_steal(output, output->name);
+
/* Give the output a new name with @out-temp appended */
temp->name = ralloc_asprintf(var, "%s@out-temp", output->name);
temp->data.mode = nir_var_global;