diff options
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: | |||
| 2293 | ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ), | 2293 | ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ), |
| 2294 | "MZ is not implemented"); | 2294 | "MZ is not implemented"); |
| 2295 | 2295 | ||
| 2296 | u32 op_c_offset = 0; | ||
| 2297 | |||
| 2296 | switch (texture_type) { | 2298 | switch (texture_type) { |
| 2297 | case Tegra::Shader::TextureType::Texture1D: { | 2299 | case Tegra::Shader::TextureType::Texture1D: { |
| 2298 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); | 2300 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); |
| @@ -2307,6 +2309,7 @@ private: | |||
| 2307 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); | 2309 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); |
| 2308 | const std::string y = regs.GetRegisterAsInteger(instr.gpr20); | 2310 | const std::string y = regs.GetRegisterAsInteger(instr.gpr20); |
| 2309 | coord = "ivec2 coords = ivec2(" + x + ", " + y + ");"; | 2311 | coord = "ivec2 coords = ivec2(" + x + ", " + y + ");"; |
| 2312 | op_c_offset = 1; | ||
| 2310 | } | 2313 | } |
| 2311 | break; | 2314 | break; |
| 2312 | } | 2315 | } |
| @@ -2318,13 +2321,14 @@ private: | |||
| 2318 | const std::string sampler = | 2321 | const std::string sampler = |
| 2319 | GetSampler(instr.sampler, texture_type, is_array, false); | 2322 | GetSampler(instr.sampler, texture_type, is_array, false); |
| 2320 | std::string texture = "texelFetch(" + sampler + ", coords, 0)"; | 2323 | std::string texture = "texelFetch(" + sampler + ", coords, 0)"; |
| 2321 | const std::string op_c = regs.GetRegisterAsInteger(instr.gpr20.Value() + 1); | ||
| 2322 | switch (instr.tlds.GetTextureProcessMode()) { | 2324 | switch (instr.tlds.GetTextureProcessMode()) { |
| 2323 | case Tegra::Shader::TextureProcessMode::LZ: { | 2325 | case Tegra::Shader::TextureProcessMode::LZ: { |
| 2324 | texture = "texelFetch(" + sampler + ", coords, 0)"; | 2326 | texture = "texelFetch(" + sampler + ", coords, 0)"; |
| 2325 | break; | 2327 | break; |
| 2326 | } | 2328 | } |
| 2327 | case Tegra::Shader::TextureProcessMode::LL: { | 2329 | case Tegra::Shader::TextureProcessMode::LL: { |
| 2330 | const std::string op_c = | ||
| 2331 | regs.GetRegisterAsInteger(instr.gpr20.Value() + op_c_offset); | ||
| 2328 | texture = "texelFetch(" + sampler + ", coords, " + op_c + ')'; | 2332 | texture = "texelFetch(" + sampler + ", coords, " + op_c + ')'; |
| 2329 | break; | 2333 | break; |
| 2330 | } | 2334 | } |