yuzu-emu
/
yuzu
Archived
1
0
Fork 0

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:
bunnei 2019-05-09 13:22:42 -04:00 committed by GitHub
commit f69d3a6351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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();