diff options
author | Timothy Arceri <tarceri@itsqueeze.com> | 2017-08-23 16:33:00 +1000 |
---|---|---|
committer | Timothy Arceri <tarceri@itsqueeze.com> | 2017-08-25 13:20:29 +1000 |
commit | ea2515d780a40599036ff50b572d309e69635d20 (patch) | |
tree | 59e522c374888ab726219ac72bfb5b81537fcd0b /src/util | |
parent | 07018d49dc95b0a9cf7b22c33af2286c36583e82 (diff) |
glsl: pass shader source keys to the disk cache
We don't actually write them to disk here. That will happen in the
following commit.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/disk_cache.c | 8 | ||||
-rw-r--r-- | src/util/disk_cache.h | 6 |
2 files changed, 9 insertions, 5 deletions
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 <key>. @@ -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; } |