Module: Mesa Branch: 17.3 Commit: a12ca3b231a6454d8adf5da916af363c321b5f1a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a12ca3b231a6454d8adf5da916af363c321b5f1a
Author: Jordan Justen <[email protected]> Date: Fri Oct 13 22:04:52 2017 -0700 disk_cache: Fix issue reading GLSL metadata This would cause the read of the metadata content to fail, which would prevent the linking from being skipped. Seen on Rocket League with i965 shader cache. Fixes: b86ecea3446e "util/disk_cache: write cache item metadata to disk" Cc: Timothy Arceri <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit e5b141634cff3aa1f68699f39a2c3794261a32b1) --- src/util/disk_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index e38cacb259..fde6e2e097 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -1110,7 +1110,7 @@ disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size) * TODO: pass the metadata back to the caller and do some basic * validation. */ - cache_item_md_size += sizeof(cache_key); + cache_item_md_size += num_keys * sizeof(cache_key); ret = lseek(fd, num_keys * sizeof(cache_key), SEEK_CUR); if (ret == -1) goto fail; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
