From b4db9aebf2b4ac53b6a24ce360bb23e0b8b0f0fa Mon Sep 17 00:00:00 2001 From: SachinVin <26602104+SachinVin@users.noreply.github.com> Date: Sun, 7 May 2023 05:04:40 +0530 Subject: [PATCH] gl_shader_disk_cache.cpp: Flush transferable_file and precompiled_file more often (#6483) --- src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 53712a1121..d62164131a 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -372,6 +372,7 @@ void ShaderDiskCache::SaveRaw(const ShaderDiskCacheRaw& entry) { return; } transferable.insert({id, entry}); + transferable_file.Flush(); } void ShaderDiskCache::SaveDecompiled(u64 unique_identifier, @@ -439,6 +440,8 @@ void ShaderDiskCache::SaveDumpToFile(u64 unique_identifier, GLuint program, bool // SaveDecompiled is used only to store the accurate multiplication setting, a better way is to // probably change the header in SaveDump SaveDecompiledToFile(precompiled_file, unique_identifier, {}, sanitize_mul); + + precompiled_file.Flush(); } bool ShaderDiskCache::IsUsable() const {