mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
nir/lower_out_to_temp: Steal the output's constant initializer
Reviewed-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
38de85f9a5
commit
31a5bec93f
1 changed files with 3 additions and 0 deletions
|
|
@ -97,6 +97,9 @@ nir_lower_outputs_to_temporaries(nir_shader *shader)
|
|||
/* 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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue