diff options
author | Fernando S <fsahmkow27@gmail.com> | 2023-01-06 17:58:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 17:58:36 +0100 |
commit | 7ef897a277583c97c6cf7377a3c381271ecb6403 (patch) | |
tree | ec9212ad3c78eec08c43d505ff23f79da64beafc /src/video_core | |
parent | Merge pull request #9535 from bylaws/master (diff) | |
parent | video_core/vulkan: Fixed loading of Vulkan driver pipeline cache (diff) | |
download | yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.tar yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.tar.gz yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.tar.bz2 yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.tar.lz yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.tar.xz yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.tar.zst yuzu-7ef897a277583c97c6cf7377a3c381271ecb6403.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 013b42cf8..7e69b11d8 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -793,7 +793,8 @@ vk::PipelineCache PipelineCache::LoadVulkanPipelineCache(const std::filesystem:: return create_pipeline_cache(0, nullptr); } - const size_t cache_size = static_cast<size_t>(end) - magic_number.size(); + static constexpr size_t header_size = magic_number.size() + sizeof(cache_version); + const size_t cache_size = static_cast<size_t>(end) - header_size; std::vector<char> cache_data(cache_size); file.read(cache_data.data(), cache_size); |