[Mesa-dev] [PATCH] nir: Fix output variable names
Michael Schellenberger Costa
mschellenbergercosta at googlemail.com
Fri Sep 11 00:50:20 PDT 2015
Hi,
didnt Jason just send a similar patch to the list?
[Mesa-dev] [PATCH] nir/lower_outputs_to_temporaries: Reparent the output
name
Regards
Michael
Am 11/09/2015 um 09:24 schrieb Eduardo Lima Mitev:
> Commit 1dbe4af9c9e318525fc082b542b93fb7f1e5efba
> "nir: Add a pass to lower outputs to temporary variables" messed up output
> variable names. The issue can be reproduced by dumping the NIR shaders
> with INTEL_DEBUG="vs,fs".
> ---
> src/glsl/nir/nir_lower_outputs_to_temporaries.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/nir/nir_lower_outputs_to_temporaries.c b/src/glsl/nir/nir_lower_outputs_to_temporaries.c
> index b730cad..e9c4c0d 100644
> --- a/src/glsl/nir/nir_lower_outputs_to_temporaries.c
> +++ b/src/glsl/nir/nir_lower_outputs_to_temporaries.c
> @@ -87,12 +87,13 @@ nir_lower_outputs_to_temporaries(nir_shader *shader)
> foreach_list_typed(nir_variable, var, node, &state.old_outputs) {
> nir_variable *output = ralloc(shader, nir_variable);
> memcpy(output, var, sizeof *output);
> + output->name = ralloc_strdup(output, var->name);
>
> /* The orignal is now the temporary */
> nir_variable *temp = var;
>
> /* Give the output a new name with @out-temp appended */
> - temp->name = ralloc_asprintf(var, "%s at out-temp", output->name);
> + temp->name = ralloc_asprintf(output, "%s at out-temp", output->name);
> temp->data.mode = nir_var_global;
> temp->constant_initializer = NULL;
>
>
More information about the mesa-dev
mailing list