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 <lina@asahilina.net>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>
This commit is contained in:
Asahi Lina
2023-09-01 18:52:14 +09:00
committed by Marge Bot
parent 8781c448a4
commit 23c5ff814e

View File

@@ -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);