From 23c5ff814e7aa078d90a1d1f929d1e9bd3497ab9 Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Fri, 1 Sep 2023 18:52:14 +0900 Subject: [PATCH] asahi: Allow no16 flag for disk cache The debug flags are already plumbed into driver_flags for the disk cache, so we just need to actually allow some flags instead of bailing out of the disk cache init. We only care about no16 for production right now, and it's probably a good idea to disable disk caching during most debug sessions, so allowlist only that one. Signed-off-by: Asahi Lina Reviewed-by: Eric Engestrom Part-of: --- src/gallium/drivers/asahi/agx_disk_cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_disk_cache.c b/src/gallium/drivers/asahi/agx_disk_cache.c index bb5f54b..f33a971 100644 --- a/src/gallium/drivers/asahi/agx_disk_cache.c +++ b/src/gallium/drivers/asahi/agx_disk_cache.c @@ -18,6 +18,9 @@ #include "agx_disk_cache.h" #include "agx_state.h" +/* Flags that are allowed and do not disable the disk cache */ +#define ALLOWED_FLAGS (AGX_DBG_NO16) + /** * Compute a disk cache key for the given uncompiled shader and shader key. */ @@ -134,7 +137,7 @@ void agx_disk_cache_init(struct agx_screen *screen) { #ifdef ENABLE_SHADER_CACHE - if (agx_get_compiler_debug() || screen->dev.debug) + if (agx_get_compiler_debug() || (screen->dev.debug & ~ALLOWED_FLAGS)) return; const char *renderer = screen->pscreen.get_name(&screen->pscreen); -- 2.7.4