Update src/video_core/renderer_opengl/gl_shader_manager.cpp

Co-authored-by: Marshall Mohror <mohror64@gmail.com>
This commit is contained in:
gal20 2020-11-14 21:45:30 +02:00 committed by GitHub
parent 03c002ee2a
commit 5055212063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,7 +267,8 @@ public:
auto [iter, new_shader] = shader_cache.emplace(program, OGLShaderStage{separable}); auto [iter, new_shader] = shader_cache.emplace(program, OGLShaderStage{separable});
OGLShaderStage& cached_shader = iter->second; OGLShaderStage& cached_shader = iter->second;
if (new_shader) { if (new_shader) {
result.code = program; result.emplace();
result->code = program;
cached_shader.Create(program.c_str(), ShaderType); cached_shader.Create(program.c_str(), ShaderType);
} }
shader_map[key] = &cached_shader; shader_map[key] = &cached_shader;