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 8dfb49507..6220323a0 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -2254,6 +2254,8 @@ private: | |||
| 2254 | ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ), | 2254 | ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ), |
| 2255 | "MZ is not implemented"); | 2255 | "MZ is not implemented"); |
| 2256 | 2256 | ||
| 2257 | u32 op_c_offset = 0; | ||
| 2258 | |||
| 2257 | switch (texture_type) { | 2259 | switch (texture_type) { |
| 2258 | case Tegra::Shader::TextureType::Texture1D: { | 2260 | case Tegra::Shader::TextureType::Texture1D: { |
| 2259 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); | 2261 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); |
| @@ -2268,6 +2270,7 @@ private: | |||
| 2268 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); | 2270 | const std::string x = regs.GetRegisterAsInteger(instr.gpr8); |
| 2269 | const std::string y = regs.GetRegisterAsInteger(instr.gpr20); | 2271 | const std::string y = regs.GetRegisterAsInteger(instr.gpr20); |
| 2270 | coord = "ivec2 coords = ivec2(" + x + ", " + y + ");"; | 2272 | coord = "ivec2 coords = ivec2(" + x + ", " + y + ");"; |
| 2273 | op_c_offset = 1; | ||
| 2271 | } | 2274 | } |
| 2272 | break; | 2275 | break; |
| 2273 | } | 2276 | } |
| @@ -2279,13 +2282,14 @@ private: | |||
| 2279 | const std::string sampler = | 2282 | const std::string sampler = |
| 2280 | GetSampler(instr.sampler, texture_type, is_array, false); | 2283 | GetSampler(instr.sampler, texture_type, is_array, false); |
| 2281 | std::string texture = "texelFetch(" + sampler + ", coords, 0)"; | 2284 | std::string texture = "texelFetch(" + sampler + ", coords, 0)"; |
| 2282 | const std::string op_c = regs.GetRegisterAsInteger(instr.gpr20.Value() + 1); | ||
| 2283 | switch (instr.tlds.GetTextureProcessMode()) { | 2285 | switch (instr.tlds.GetTextureProcessMode()) { |
| 2284 | case Tegra::Shader::TextureProcessMode::LZ: { | 2286 | case Tegra::Shader::TextureProcessMode::LZ: { |
| 2285 | texture = "texelFetch(" + sampler + ", coords, 0)"; | 2287 | texture = "texelFetch(" + sampler + ", coords, 0)"; |
| 2286 | break; | 2288 | break; |
| 2287 | } | 2289 | } |
| 2288 | case Tegra::Shader::TextureProcessMode::LL: { | 2290 | case Tegra::Shader::TextureProcessMode::LL: { |
| 2291 | const std::string op_c = | ||
| 2292 | regs.GetRegisterAsInteger(instr.gpr20.Value() + op_c_offset); | ||
| 2289 | texture = "texelFetch(" + sampler + ", coords, " + op_c + ')'; | 2293 | texture = "texelFetch(" + sampler + ", coords, " + op_c + ')'; |
| 2290 | break; | 2294 | break; |
| 2291 | } | 2295 | } |