[Mesa-dev] [PATCH 23/26] nir/lower_out_to_temp: Steal the output's constant initializer

Rob Clark robdclark at gmail.com
Sat Mar 26 16:18:07 UTC 2016


On Fri, Mar 25, 2016 at 7:12 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
>

Reviewed-by: Rob Clark <robdclark at gmail.com>

> ---
>  src/compiler/nir/nir_lower_outputs_to_temporaries.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/compiler/nir/nir_lower_outputs_to_temporaries.c b/src/compiler/nir/nir_lower_outputs_to_temporaries.c
> index 71b06b8..80c9af4 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 at out-temp", output->name);
>        temp->data.mode = nir_var_global;
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list