mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
ttn: init source_blake3 and name from tgsi_shader_info
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 <timur.kristof@gmail.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
This commit is contained in:
parent
59a3f38ff6
commit
b4e94cf421
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue