asahi: disable disk cache in debug runs
authorRose Hudson <rose@krx.sh>
Tue, 7 Mar 2023 20:15:07 +0000 (20:15 +0000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Mar 2023 02:07:44 +0000 (02:07 +0000)
With debug flags enabled, shaders might get compiled differently and
running compilation might be desired e.g. for logging, so don't try to
cache them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21776>

src/gallium/drivers/asahi/agx_disk_cache.c

index 366af33..d15457d 100644 (file)
@@ -25,6 +25,7 @@
 #include <assert.h>
 #include <stdio.h>
 
+#include "asahi/compiler/agx_debug.h"
 #include "compiler/shader_enums.h"
 #include "util/blob.h"
 #include "util/build_id.h"
@@ -150,6 +151,9 @@ void
 agx_disk_cache_init(struct agx_screen *screen)
 {
 #ifdef ENABLE_SHADER_CACHE
+   if (agx_compiler_debug || screen->dev.debug)
+      return;
+
    const char *renderer = screen->pscreen.get_name(&screen->pscreen);
 
    const struct build_id_note *note =