util/disk_cache: do crc32 check on compressed data for ZSTD

This will be faster and avoids checking for errors with the
compression implementation which we shouldn't need to do. Instead
we trust the compression library does the correct thing and simply
error check the data loaded from disk.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
This commit is contained in:
Timothy Arceri
2020-10-16 15:07:34 +11:00
committed by Marge Bot
parent f54a65c69b
commit 48d7c4e0f3
3 changed files with 46 additions and 24 deletions
-6
View File
@@ -89,11 +89,6 @@ struct disk_cache_put_job {
struct cache_item_metadata cache_item_metadata;
};
struct cache_entry_file_data {
uint32_t crc32;
uint32_t uncompressed_size;
};
char *
disk_cache_generate_cache_dir(void *mem_ctx);
@@ -111,7 +106,6 @@ disk_cache_get_cache_filename(struct disk_cache *cache, const cache_key key);
void
disk_cache_write_item_to_disk(struct disk_cache_put_job *dc_job,
struct cache_entry_file_data *cf_data,
char *filename);
bool