diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-18 00:58:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 00:58:38 +0200 |
commit | 77e2d68df7ef87168f286169c620701a2b2f298e (patch) | |
tree | a42fb0257a9752735f26dea0a5c2265e85fcbde7 /src | |
parent | Merge pull request #1497 from bunnei/flush-framebuffers (diff) | |
parent | Fix TLDS (diff) | |
download | yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.tar yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.tar.gz yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.tar.bz2 yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.tar.lz yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.tar.xz yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.tar.zst yuzu-77e2d68df7ef87168f286169c620701a2b2f298e.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 28dba0084..55c33c3a9 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2293,6 +2293,8 @@ private: ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ), "MZ is not implemented"); + u32 op_c_offset = 0; + switch (texture_type) { case Tegra::Shader::TextureType::Texture1D: { const std::string x = regs.GetRegisterAsInteger(instr.gpr8); @@ -2307,6 +2309,7 @@ private: const std::string x = regs.GetRegisterAsInteger(instr.gpr8); const std::string y = regs.GetRegisterAsInteger(instr.gpr20); coord = "ivec2 coords = ivec2(" + x + ", " + y + ");"; + op_c_offset = 1; } break; } @@ -2318,13 +2321,14 @@ private: const std::string sampler = GetSampler(instr.sampler, texture_type, is_array, false); std::string texture = "texelFetch(" + sampler + ", coords, 0)"; - const std::string op_c = regs.GetRegisterAsInteger(instr.gpr20.Value() + 1); switch (instr.tlds.GetTextureProcessMode()) { case Tegra::Shader::TextureProcessMode::LZ: { texture = "texelFetch(" + sampler + ", coords, 0)"; break; } case Tegra::Shader::TextureProcessMode::LL: { + const std::string op_c = + regs.GetRegisterAsInteger(instr.gpr20.Value() + op_c_offset); texture = "texelFetch(" + sampler + ", coords, " + op_c + ')'; break; } |