Mesa (master): prog_to_nir: Revert name initialization change

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 12 05:49:07 UTC 2020


Module: Mesa
Branch: master
Commit: f89b29f708cbc8140f3a5f4520f5dd4e5d402e0d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f89b29f708cbc8140f3a5f4520f5dd4e5d402e0d

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Nov 11 13:44:47 2020 -0800

prog_to_nir: Revert name initialization change

Commit eda3e4e055e240a14c6ad4bdbde544c6348fc01d moved the creation of
s->info.name to shader creation time, rather than after the compile.
A few lines after creating the shader, prog_to_nir clobbers s->info
entirely, losing the name.

This dropped the "ARB" indicator that iris uses to switch math to the
legacy non-IEEE mode used by ARB_vertex_program/fragment_program.

Revert that hunk and go back to doing things the way they were.

Fixes: eda3e4e055e ("nir/builder: Add a name format arg to nir_builder_init_simple_shader().")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3777
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7564>

---

 src/mesa/program/prog_to_nir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 8ce77a684da..cde4de2ec7d 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -969,8 +969,7 @@ prog_to_nir(const struct gl_program *prog,
       return NULL;
    c->prog = prog;
 
-   c->build = nir_builder_init_simple_shader(stage, options,
-                                             "ARB%d", prog->Id);
+   c->build = nir_builder_init_simple_shader(stage, options, NULL);
 
    /* Copy the shader_info from the gl_program */
    c->build.shader->info = prog->info;
@@ -998,6 +997,7 @@ prog_to_nir(const struct gl_program *prog,
 
    ptn_add_output_stores(c);
 
+   s->info.name = ralloc_asprintf(s, "ARB%d", prog->Id);
    s->info.num_textures = util_last_bit(prog->SamplersUsed);
    s->info.num_ubos = 0;
    s->info.num_abos = 0;



More information about the mesa-commit mailing list