diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-15 06:17:38 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-07 02:23:40 +0100 |
commit | 8ee3666a3c19c3522fc980c5bed8a519e99e0d95 (patch) | |
tree | 226bf4dc7f51d76bfa4198bdcc9af1d9e95e3440 /src/video_core/renderer_opengl/gl_shader_cache.cpp | |
parent | gl_shader_disk_cache: Compress program binaries using LZ4 (diff) | |
download | yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.tar yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.tar.gz yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.tar.bz2 yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.tar.lz yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.tar.xz yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.tar.zst yuzu-8ee3666a3c19c3522fc980c5bed8a519e99e0d95.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_cache.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 761b355e4..49b872c44 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -344,17 +344,15 @@ ShaderDiskCacheUsage CachedShader::GetUsage(GLenum primitive_mode, ShaderCacheOpenGL::ShaderCacheOpenGL(RasterizerOpenGL& rasterizer) : RasterizerCache{rasterizer} {} void ShaderCacheOpenGL::LoadDiskCache() { - std::vector<ShaderDiskCacheRaw> raws; - std::vector<ShaderDiskCacheUsage> usages; - if (!disk_cache.LoadTransferable(raws, usages)) { + const auto transferable = disk_cache.LoadTransferable(); + if (!transferable) { return; } + const auto [raws, usages] = *transferable; - std::map<u64, ShaderDiskCacheDecompiled> decompiled; - std::map<ShaderDiskCacheUsage, ShaderDiskCacheDump> dumps; - disk_cache.LoadPrecompiled(decompiled, dumps); + auto [decompiled, dumps] = disk_cache.LoadPrecompiled(); - const std::set<GLenum> supported_formats{GetSupportedFormats()}; + const auto supported_formats{GetSupportedFormats()}; const auto unspecialized{GenerateUnspecializedShaders(raws, decompiled)}; // Build shaders |