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@out-temp", output->name); + temp->name = ralloc_asprintf(output, "%s@out-temp", output->name); temp->data.mode = nir_var_global; temp->constant_initializer = NULL; -- 2.4.6 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev