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 0cd6dbc15a..0978a29ada 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -133,7 +133,7 @@ std::optional> ShaderDiskCache::LoadTransferable if (version < NativeVersion) { LOG_INFO(Render_OpenGL, "Transferable shader cache is old - removing"); file.Close(); - InvalidateTransferable(); + InvalidateAll(); return {}; } if (version > NativeVersion) { @@ -298,7 +298,7 @@ bool ShaderDiskCache::SaveDecompiledFile(u64 unique_identifier, return true; } -void ShaderDiskCache::InvalidateTransferable() { +void ShaderDiskCache::InvalidateAll() { if (!FileUtil::Delete(GetTransferablePath())) { LOG_ERROR(Render_OpenGL, "Failed to invalidate transferable file={}", GetTransferablePath()); @@ -331,7 +331,7 @@ void ShaderDiskCache::SaveRaw(const ShaderDiskCacheRaw& entry) { if (file.WriteObject(TransferableEntryKind::Raw) != 1 || !entry.Save(file)) { LOG_ERROR(Render_OpenGL, "Failed to save raw transferable cache entry - removing"); file.Close(); - InvalidateTransferable(); + InvalidateAll(); return; } transferable.insert({id, entry}); 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 5e2779ef6e..9492fd9c09 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -99,7 +99,7 @@ public: std::pair LoadPrecompiled(); /// Removes the transferable (and precompiled) cache file. - void InvalidateTransferable(); + void InvalidateAll(); /// Removes the precompiled cache file and clears virtual precompiled cache file. void InvalidatePrecompiled(); diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index f8f3264cbd..bb31e2ed76 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -481,8 +481,7 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading, "Invalid hash in entry={:016x} (obtained hash={:016x}) - removing " "shader cache", raw.GetUniqueIdentifier(), calculated_hash); - disk_cache.InvalidateTransferable(); - disk_cache.InvalidatePrecompiled(); + disk_cache.InvalidateAll(); return; } @@ -600,7 +599,7 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading, LoadTransferable(0, raws.size(), raws); if (compilation_failed) { - disk_cache.InvalidateTransferable(); + disk_cache.InvalidateAll(); } if (precompiled_cache_altered) {