radeonsi: add si_screen::use_aco to shader cache key to fix shader cache failures

Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit 13edb27ad5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
Marek Olšák
2025-01-06 10:46:44 -05:00
committed by Dylan Baker
parent 993dbad958
commit be4ab526b2
2 changed files with 6 additions and 1 deletions

View File

@@ -174,7 +174,7 @@
"description": "radeonsi: add si_screen::use_aco to shader cache key to fix shader cache failures",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View File

@@ -1121,6 +1121,11 @@ static void si_disk_cache_create(struct si_screen *sscreen)
return;
#endif
/* NIR options depend on si_screen::use_aco, which affects all shaders, including GLSL
* compilation.
*/
_mesa_sha1_update(&ctx, &sscreen->use_aco, sizeof(sscreen->use_aco));
_mesa_sha1_final(&ctx, sha1);
mesa_bytes_to_hex(cache_id, sha1, 20);