diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-14 05:25:25 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-07 02:20:57 +0100 |
commit | 403908622670d11531e132e5bbab13a5f4cf05ce (patch) | |
tree | 5ea50b222e670eb9afa6b16d338d830cc97a887b | |
parent | gl_shader_disk_cache: Add precompiled load (diff) | |
download | yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.tar yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.tar.gz yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.tar.bz2 yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.tar.lz yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.tar.xz yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.tar.zst yuzu-403908622670d11531e132e5bbab13a5f4cf05ce.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 5 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp index a87bb1f9e..4d02a800d 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -156,6 +156,11 @@ std::vector<ShaderDiskCachePrecompiledEntry> ShaderDiskCacheOpenGL::LoadPrecompi return precompiled; } +void ShaderDiskCacheOpenGL::InvalidateTransferable() const { + FileUtil::Delete(GetTransferablePath()); + InvalidatePrecompiled(); +} + void ShaderDiskCacheOpenGL::InvalidatePrecompiled() const { FileUtil::Delete(GetPrecompiledPath()); } diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h index e68aea694..6c4c7bd5c 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -147,6 +147,9 @@ public: /// Loads current game's precompiled cache. Invalidates if emulator's version has changed. std::vector<ShaderDiskCachePrecompiledEntry> LoadPrecompiled(); + /// Removes the transferable (and precompiled) cache file. + void InvalidateTransferable() const; + /// Removes the precompiled cache file. void InvalidatePrecompiled() const; |