diff options
| author | 2018-11-28 21:31:10 -0300 | |
|---|---|---|
| committer | 2018-11-28 23:46:16 -0300 | |
| commit | 8d58e5da716d712b307e1e720746ab4e8477cf01 (patch) | |
| tree | c878007c515e2cb486d15e6108348c71946436d0 /src | |
| parent | gl_shader_decompiler: Use GLSL scope on instructions unrelated to textures (diff) | |
| download | yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.gz yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.xz yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.zip | |
gl_shader_decompiler: Flip negated if else statement
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 0bba8fa5a..a279599ef 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -3003,12 +3003,12 @@ private: | |||
| 3003 | // TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction. | 3003 | // TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction. |
| 3004 | const std::string sampler = GetSampler( | 3004 | const std::string sampler = GetSampler( |
| 3005 | instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare); | 3005 | instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare); |
| 3006 | if (!depth_compare) { | 3006 | if (depth_compare) { |
| 3007 | shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");"); | ||
| 3008 | } else { | ||
| 3009 | // Note: TLD4S coordinate encoding works just like TEXS's | 3007 | // Note: TLD4S coordinate encoding works just like TEXS's |
| 3010 | const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1); | 3008 | const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1); |
| 3011 | shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");"); | 3009 | shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");"); |
| 3010 | } else { | ||
| 3011 | shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");"); | ||
| 3012 | } | 3012 | } |
| 3013 | 3013 | ||
| 3014 | std::string texture = "textureGather(" + sampler + ", coords, " + | 3014 | std::string texture = "textureGather(" + sampler + ", coords, " + |