ir3,tu: include ir3 debug flags in shader hash key

Many debug flags influence shader codegen but are currently not included
in the hash key. This causes surprising effects as cache lookups may
return shaders compiled with different debug flags than currently in
effect. This patch fixes this by including all debug flags  in the
shader hash key.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: c323848b0b ("ir3, tu: Plumb through support for per-shader robustness")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
This commit is contained in:
Job Noorman
2024-11-12 09:38:52 +01:00
committed by Marge Bot
parent 4ec43c59da
commit d8c90806e4

View File

@@ -1483,6 +1483,8 @@ tu_hash_shaders(unsigned char *hash,
}
}
_mesa_sha1_update(&ctx, &state, sizeof(state));
enum ir3_shader_debug ir3_debug_key = ir3_shader_debug;
_mesa_sha1_update(&ctx, &ir3_debug_key, sizeof(ir3_debug_key));
_mesa_sha1_final(&ctx, hash);
}
@@ -1501,6 +1503,8 @@ tu_hash_compute(unsigned char *hash,
_mesa_sha1_update(&ctx, layout->sha1, sizeof(layout->sha1));
tu_hash_stage(&ctx, pipeline_flags, stage, NULL, key);
enum ir3_shader_debug ir3_debug_key = ir3_shader_debug;
_mesa_sha1_update(&ctx, &ir3_debug_key, sizeof(ir3_debug_key));
_mesa_sha1_final(&ctx, hash);
}