[Mesa-dev] [PATCH v3 32/34] disk_cache: Fix issue reading GLSL metadata
Kenneth Graunke
kenneth at whitecape.org
Mon Oct 30 22:54:09 UTC 2017
On Sunday, October 22, 2017 1:01:40 PM PDT Jordan Justen wrote:
> 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.
>
> Cc: Timothy Arceri <tarceri at itsqueeze.com>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
> ---
> 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 e38cacb259b..fde6e2e0974 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;
>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171030/56dabb06/attachment.sig>
More information about the mesa-dev
mailing list