diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 05a56f8406d5bc991784d58be793de566d798100..34527d8e3eb317d3e60c2f0dbe1b512e23f904a6 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -573,9 +573,11 @@ Shader ShaderCacheOpenGL::GetStageProgram(Maxwell::ShaderProgram program) { const VAddr cpu_addr{*memory_manager.GpuToCpuAddress(program_addr)}; const auto found = precompiled_shaders.find(unique_identifier); if (found != precompiled_shaders.end()) { + // Create a shader from the cache shader = std::make_shared<CachedShader>(cpu_addr, unique_identifier, program, disk_cache, precompiled_programs, found->second, host_ptr); } else { + // Create a shader from guest memory shader = std::make_shared<CachedShader>( device, cpu_addr, unique_identifier, program, disk_cache, precompiled_programs, std::move(program_code), std::move(program_code_b), host_ptr);