Module: Mesa Branch: main Commit: 213627e94b05b1cd741377678a2a306e1b0c7f9d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=213627e94b05b1cd741377678a2a306e1b0c7f9d
Author: Rob Clark <[email protected]> Date: Wed Apr 5 08:57:17 2023 -0700 util/disk_cache: Add NONE type Add an explicit enum for the DISK_CACHE_NONE type so that we don't confuse with the MULTI_FILE case on android when the blob-cache is used. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22248> --- src/util/disk_cache.c | 1 + src/util/disk_cache_os.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 6bd190df958..e7aa1bea9ab 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -121,6 +121,7 @@ disk_cache_type_create(const char *gpu_name, /* Assume failure. */ cache->path_init_failed = true; + cache->type = DISK_CACHE_NONE; #ifdef ANDROID /* Android needs the "disk cache" to be enabled for diff --git a/src/util/disk_cache_os.h b/src/util/disk_cache_os.h index 05a4c37de8e..b432877068a 100644 --- a/src/util/disk_cache_os.h +++ b/src/util/disk_cache_os.h @@ -50,6 +50,7 @@ extern "C" { #define CACHE_INDEX_MAX_KEYS (1 << CACHE_INDEX_KEY_BITS) enum disk_cache_type { + DISK_CACHE_NONE, DISK_CACHE_MULTI_FILE, DISK_CACHE_SINGLE_FILE, DISK_CACHE_DATABASE,
