mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-24 17:01:48 +01:00
Rename InvalidateTransferable to InvalidateAll to match what it does
This commit is contained in:
parent
7092ba8480
commit
2d86bc6db5
@ -133,7 +133,7 @@ std::optional<std::vector<ShaderDiskCacheRaw>> ShaderDiskCache::LoadTransferable
|
|||||||
if (version < NativeVersion) {
|
if (version < NativeVersion) {
|
||||||
LOG_INFO(Render_OpenGL, "Transferable shader cache is old - removing");
|
LOG_INFO(Render_OpenGL, "Transferable shader cache is old - removing");
|
||||||
file.Close();
|
file.Close();
|
||||||
InvalidateTransferable();
|
InvalidateAll();
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
if (version > NativeVersion) {
|
if (version > NativeVersion) {
|
||||||
@ -298,7 +298,7 @@ bool ShaderDiskCache::SaveDecompiledFile(u64 unique_identifier,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderDiskCache::InvalidateTransferable() {
|
void ShaderDiskCache::InvalidateAll() {
|
||||||
if (!FileUtil::Delete(GetTransferablePath())) {
|
if (!FileUtil::Delete(GetTransferablePath())) {
|
||||||
LOG_ERROR(Render_OpenGL, "Failed to invalidate transferable file={}",
|
LOG_ERROR(Render_OpenGL, "Failed to invalidate transferable file={}",
|
||||||
GetTransferablePath());
|
GetTransferablePath());
|
||||||
@ -331,7 +331,7 @@ void ShaderDiskCache::SaveRaw(const ShaderDiskCacheRaw& entry) {
|
|||||||
if (file.WriteObject(TransferableEntryKind::Raw) != 1 || !entry.Save(file)) {
|
if (file.WriteObject(TransferableEntryKind::Raw) != 1 || !entry.Save(file)) {
|
||||||
LOG_ERROR(Render_OpenGL, "Failed to save raw transferable cache entry - removing");
|
LOG_ERROR(Render_OpenGL, "Failed to save raw transferable cache entry - removing");
|
||||||
file.Close();
|
file.Close();
|
||||||
InvalidateTransferable();
|
InvalidateAll();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
transferable.insert({id, entry});
|
transferable.insert({id, entry});
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
std::pair<ShaderDecompiledMap, ShaderDumpsMap> LoadPrecompiled();
|
std::pair<ShaderDecompiledMap, ShaderDumpsMap> LoadPrecompiled();
|
||||||
|
|
||||||
/// Removes the transferable (and precompiled) cache file.
|
/// Removes the transferable (and precompiled) cache file.
|
||||||
void InvalidateTransferable();
|
void InvalidateAll();
|
||||||
|
|
||||||
/// Removes the precompiled cache file and clears virtual precompiled cache file.
|
/// Removes the precompiled cache file and clears virtual precompiled cache file.
|
||||||
void InvalidatePrecompiled();
|
void InvalidatePrecompiled();
|
||||||
|
@ -481,8 +481,7 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
"Invalid hash in entry={:016x} (obtained hash={:016x}) - removing "
|
"Invalid hash in entry={:016x} (obtained hash={:016x}) - removing "
|
||||||
"shader cache",
|
"shader cache",
|
||||||
raw.GetUniqueIdentifier(), calculated_hash);
|
raw.GetUniqueIdentifier(), calculated_hash);
|
||||||
disk_cache.InvalidateTransferable();
|
disk_cache.InvalidateAll();
|
||||||
disk_cache.InvalidatePrecompiled();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -600,7 +599,7 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
|||||||
LoadTransferable(0, raws.size(), raws);
|
LoadTransferable(0, raws.size(), raws);
|
||||||
|
|
||||||
if (compilation_failed) {
|
if (compilation_failed) {
|
||||||
disk_cache.InvalidateTransferable();
|
disk_cache.InvalidateAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (precompiled_cache_altered) {
|
if (precompiled_cache_altered) {
|
||||||
|
Loading…
Reference in New Issue
Block a user