radeonsi: disable disk cache when use aco
authorQiang Yu <yuq825@gmail.com>
Mon, 9 Oct 2023 02:53:36 +0000 (10:53 +0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 11 Oct 2023 02:36:29 +0000 (02:36 +0000)
This is a temp fix. Currently we mix use llvm and aco to compile
shaders when AMD_DEBUG=useaco, but disk cache need function
identifier when creation, aco compiled shader should not use llvm
function identifier, so we have to disable disk cache when use
aco for now.

After aco is able to compile all shaders, we can re-enable disk
cache by removing the llvm function identifier when aco.

Fixes: d1dd36a74e1 ("radeonsi: be able to use aco compiler for mono ps")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9673
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25607>

src/gallium/drivers/radeonsi/si_pipe.c

index f5c820f4ad60b584517af29d1a46168fe0b881c6..5c67a9ae005c1e4a741adcf0640e0a276695922e 100644 (file)
@@ -1099,7 +1099,7 @@ static void si_test_gds_memory_management(struct si_context *sctx, unsigned allo
 static void si_disk_cache_create(struct si_screen *sscreen)
 {
    /* Don't use the cache if shader dumping is enabled. */
-   if (sscreen->debug_flags & DBG_ALL_SHADERS)
+   if (sscreen->debug_flags & (DBG_ALL_SHADERS | DBG(USE_ACO)))
       return;
 
    struct mesa_sha1 ctx;