From 403908622670d11531e132e5bbab13a5f4cf05ce Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 14 Jan 2019 01:25:25 -0300 Subject: gl_shader_disk_cache: Add transferable cache invalidation --- src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 5 +++++ src/video_core/renderer_opengl/gl_shader_disk_cache.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'src/video_core') 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 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 LoadPrecompiled(); + /// Removes the transferable (and precompiled) cache file. + void InvalidateTransferable() const; + /// Removes the precompiled cache file. void InvalidatePrecompiled() const; -- cgit v1.2.3