mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
gl_shader_disk_cache: Skip stored shader variants instead of asserting
Instead of asserting on already stored shader variants, silently skip them. This shouldn't be happening but when a shader is invalidated and it is not stored in the shader cache, this assert would hit and save that shader anyways when the asserts are disabled.
This commit is contained in:
parent
fb420358a9
commit
4aa081b4e7
|
@ -475,7 +475,10 @@ void ShaderDiskCacheOpenGL::SaveUsage(const ShaderDiskCacheUsage& usage) {
|
||||||
ASSERT_MSG(it != transferable.end(), "Saving shader usage without storing raw previously");
|
ASSERT_MSG(it != transferable.end(), "Saving shader usage without storing raw previously");
|
||||||
|
|
||||||
auto& usages{it->second};
|
auto& usages{it->second};
|
||||||
ASSERT(usages.find(usage) == usages.end());
|
if (usages.find(usage) != usages.end()) {
|
||||||
|
// Skip this variant since the shader is already stored.
|
||||||
|
return;
|
||||||
|
}
|
||||||
usages.insert(usage);
|
usages.insert(usage);
|
||||||
|
|
||||||
FileUtil::IOFile file = AppendTransferableFile();
|
FileUtil::IOFile file = AppendTransferableFile();
|
||||||
|
|
Loading…
Reference in a new issue