summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-05-09 19:22:42 +0200
committerGitHub <noreply@github.com>2019-05-09 19:22:42 +0200
commitf69d3a63517b584f106870e7c013abdbf452bf8b (patch)
tree71424723fc1bf49db4026c304aa8b5f5c740161d /src/video_core/renderer_opengl
parentMerge pull request #2445 from FearlessTobi/port-4749 (diff)
parentgl_shader_disk_cache: Skip stored shader variants instead of asserting (diff)
downloadyuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.tar
yuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.tar.gz
yuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.tar.bz2
yuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.tar.lz
yuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.tar.xz
yuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.tar.zst
yuzu-f69d3a63517b584f106870e7c013abdbf452bf8b.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_disk_cache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
index ed7afc4a0..254c0d499 100644
--- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
@@ -475,7 +475,10 @@ void ShaderDiskCacheOpenGL::SaveUsage(const ShaderDiskCacheUsage& usage) {
ASSERT_MSG(it != transferable.end(), "Saving shader usage without storing raw previously");
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);
FileUtil::IOFile file = AppendTransferableFile();