From: Jason Ekstrand Date: Thu, 31 Dec 2015 02:51:06 +0000 (-0800) Subject: nir/lower_outputs_to_temporaries: Reparent constant initializers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=601b7d5f985b9831ddfeab268b28d14e1c7ea1b7;p=mesa.git nir/lower_outputs_to_temporaries: Reparent constant initializers --- diff --git a/src/glsl/nir/nir_lower_outputs_to_temporaries.c b/src/glsl/nir/nir_lower_outputs_to_temporaries.c index 70d85138552..00ac09114cf 100644 --- a/src/glsl/nir/nir_lower_outputs_to_temporaries.c +++ b/src/glsl/nir/nir_lower_outputs_to_temporaries.c @@ -97,6 +97,9 @@ nir_lower_outputs_to_temporaries(nir_shader *shader, nir_function *entrypoint) /* Reparent the name to the new variable */ ralloc_steal(output, output->name); + /* Reparent the constant initializer (if any) */ + ralloc_steal(output, output->constant_initializer); + /* 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;