mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
gl_shader_disk_cache.cpp: Flush transferable_file and precompiled_file more often (#6483)
This commit is contained in:
parent
2e655f73b8
commit
b4db9aebf2
@ -372,6 +372,7 @@ void ShaderDiskCache::SaveRaw(const ShaderDiskCacheRaw& entry) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
transferable.insert({id, entry});
|
transferable.insert({id, entry});
|
||||||
|
transferable_file.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderDiskCache::SaveDecompiled(u64 unique_identifier,
|
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
|
// SaveDecompiled is used only to store the accurate multiplication setting, a better way is to
|
||||||
// probably change the header in SaveDump
|
// probably change the header in SaveDump
|
||||||
SaveDecompiledToFile(precompiled_file, unique_identifier, {}, sanitize_mul);
|
SaveDecompiledToFile(precompiled_file, unique_identifier, {}, sanitize_mul);
|
||||||
|
|
||||||
|
precompiled_file.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShaderDiskCache::IsUsable() const {
|
bool ShaderDiskCache::IsUsable() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user