diff options
author | Jason Ekstrand <[email protected]> | 2016-03-25 14:17:18 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-28 18:32:48 -0700 |
commit | 31a5bec93fd6a39b0bc124965e828315aff105d2 (patch) | |
tree | 1a504d0e5e1bf47b8f51f3c29c4360900c4ea2f5 /src/compiler | |
parent | 38de85f9a5f3daae65ebe715f29fe2783e4ea146 (diff) |
nir/lower_out_to_temp: Steal the output's constant initializer
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_lower_outputs_to_temporaries.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_outputs_to_temporaries.c b/src/compiler/nir/nir_lower_outputs_to_temporaries.c index 71b06b81fcc..80c9af45f2f 100644 --- a/src/compiler/nir/nir_lower_outputs_to_temporaries.c +++ b/src/compiler/nir/nir_lower_outputs_to_temporaries.c @@ -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; |