diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-05-30 18:58:38 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-05-30 18:58:38 +0200 |
commit | ad321564edf9cf4f20965ecaa3ea265bf02cbd3e (patch) | |
tree | 2129e4e02c9265d6e2dc97d1968455503e34a805 /src/video_core | |
parent | gl_shader_cache: Flip if condition in GetStageProgram to reduce indentation (diff) | |
download | yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.tar yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.tar.gz yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.tar.bz2 yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.tar.lz yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.tar.xz yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.tar.zst yuzu-ad321564edf9cf4f20965ecaa3ea265bf02cbd3e.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 05a56f840..34527d8e3 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); |