summaryrefslogtreecommitdiffstats
path: root/src/util/disk_cache.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-08-24 11:11:40 +1000
committerTimothy Arceri <[email protected]>2017-08-25 13:20:29 +1000
commit28b326238bcc14d372880a0e4fabcece4ffdc871 (patch)
treee3c4a979843c7499a18754276ee57b18e4285fa1 /src/util/disk_cache.h
parent4a091b0788664f73bbb35c14d04c00cebf37e17a (diff)
util/disk_cache: rename mesa cache dir and introduce cache versioning
Steam is already analysing cache items, unfortunatly we did not introduce a versioning mechanism for identifying structural changes to cache entries earlier so the only way to do so is to rename the cache directory. Since we are renaming it we take the opportunity to give the directory a more meaningful name. Adding a version field to the header of cache entries will help us to avoid having to rename the directory in future. Please note this is versioning for the internal structure of the entries as defined in disk_cache.{c,h} as opposed to the structure of the data provided to the disk cache by the GLSL compiler and the various driver backends. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/util/disk_cache.h')
-rw-r--r--src/util/disk_cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h
index 9aade16a9ee..3521ef4a6b5 100644
--- a/src/util/disk_cache.h
+++ b/src/util/disk_cache.h
@@ -39,6 +39,8 @@ extern "C" {
/* Size of cache keys in bytes. */
#define CACHE_KEY_SIZE 20
+#define CACHE_DIR_NAME "mesa_shader_cache"
+
typedef uint8_t cache_key[CACHE_KEY_SIZE];
struct disk_cache;