mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-24 15:23:06 +00:00
Merge pull request #2443 from ReinUsesLisp/skip-repeated-variants
gl_shader_disk_cache: Skip stored shader variants instead of asserting
This commit is contained in:
commit
f69d3a6351
1 changed files with 4 additions and 1 deletions
|
@ -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