diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-22 07:47:56 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-02-03 08:58:40 +0100 |
commit | 2bdbb90af74683bd8bb7e25d5353c39fb8037f8c (patch) | |
tree | 443865c07c307ddc4ac41e82387395bde95641e6 /src/video_core/renderer_opengl/gl_shader_cache.cpp | |
parent | maxwell_3d: Allow sampler handles with TSC id zero (diff) | |
download | yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.gz yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.bz2 yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.lz yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.xz yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.zst yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 90eda7814..6174f7074 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -23,8 +23,10 @@ using VideoCommon::Shader::ProgramCode; static VAddr GetShaderAddress(Maxwell::ShaderProgram program) { const auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); const auto& shader_config = gpu.regs.shader_config[static_cast<std::size_t>(program)]; - return *gpu.memory_manager.GpuToCpuAddress(gpu.regs.code_address.CodeAddress() + - shader_config.offset); + const auto address = gpu.memory_manager.GpuToCpuAddress(gpu.regs.code_address.CodeAddress() + + shader_config.offset); + ASSERT_MSG(address, "Invalid GPU address"); + return *address; } /// Gets the shader program code from memory for the specified address |