From b4e94cf421d5656647cb88e31bc38e3180a67ea5 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 7 Jan 2025 18:54:16 +0100 Subject: [PATCH] ttn: init source_blake3 and name from tgsi_shader_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All TTN shaders have the same name ('TTN') and the same empty blake3. Having a unique name and blake3 makes it easier to distinguish them when using NIR_DEBUG=print... Reviewed-by: Timur Kristóf (v1) Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 441e1212dc9..457a9bd513c 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -2237,6 +2237,7 @@ ttn_compile_init(const void *tgsi_tokens, struct ttn_compile *c; struct nir_shader *s; struct tgsi_shader_info scan; + static int ttn_sh_counter = 0; assert(options || screen); c = rzalloc(NULL, struct ttn_compile); @@ -2250,9 +2251,10 @@ ttn_compile_init(const void *tgsi_tokens, } c->build = nir_builder_init_simple_shader(tgsi_processor_to_shader_stage(scan.processor), - options, "TTN"); + options, "TTN%d", (int)p_atomic_inc_return(&ttn_sh_counter)); s = c->build.shader; + _mesa_blake3_compute(&scan, sizeof(scan), s->info.source_blake3); if (screen) { ttn_read_pipe_caps(c, screen);