From ea2515d780a40599036ff50b572d309e69635d20 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 23 Aug 2017 16:33:00 +1000 Subject: glsl: pass shader source keys to the disk cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't actually write them to disk here. That will happen in the following commit. Reviewed-by: Nicolai Hähnle --- src/util/disk_cache.c | 8 +++++--- src/util/disk_cache.h | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/util') diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index d2cd4e85c4..6e85a5e2be 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -768,7 +768,8 @@ deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest, static struct disk_cache_put_job * create_put_job(struct disk_cache *cache, const cache_key key, - const void *data, size_t size) + const void *data, size_t size, + struct cache_item_metadata *cache_item_metadata) { struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) malloc(sizeof(struct disk_cache_put_job) + size); @@ -931,10 +932,11 @@ cache_put(void *job, int thread_index) void disk_cache_put(struct disk_cache *cache, const cache_key key, - const void *data, size_t size) + const void *data, size_t size, + struct cache_item_metadata *cache_item_metadata) { struct disk_cache_put_job *dc_job = - create_put_job(cache, key, data, size); + create_put_job(cache, key, data, size, cache_item_metadata); if (dc_job) { util_queue_fence_init(&dc_job->fence); diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h index ef5ec2ac92..d2e4d9a69c 100644 --- a/src/util/disk_cache.h +++ b/src/util/disk_cache.h @@ -141,7 +141,8 @@ disk_cache_remove(struct disk_cache *cache, const cache_key key); */ void disk_cache_put(struct disk_cache *cache, const cache_key key, - const void *data, size_t size); + const void *data, size_t size, + struct cache_item_metadata *cache_item_metadata); /** * Retrieve an item previously stored in the cache with the name . @@ -207,7 +208,8 @@ disk_cache_destroy(struct disk_cache *cache) { static inline void disk_cache_put(struct disk_cache *cache, const cache_key key, - const void *data, size_t size) + const void *data, size_t size, + struct cache_item_metadata *cache_item_metadata) { return; } -- cgit v1.2.3