summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-11-29 01:31:10 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2018-11-29 03:46:16 +0100
commit8d58e5da716d712b307e1e720746ab4e8477cf01 (patch)
treec878007c515e2cb486d15e6108348c71946436d0
parentgl_shader_decompiler: Use GLSL scope on instructions unrelated to textures (diff)
downloadyuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar
yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.gz
yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.bz2
yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.lz
yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.xz
yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.tar.zst
yuzu-8d58e5da716d712b307e1e720746ab4e8477cf01.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp6
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:
// TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction.
const std::string sampler = GetSampler(
instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare);
- if (!depth_compare) {
- shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");");
- } else {
+ if (depth_compare) {
// Note: TLD4S coordinate encoding works just like TEXS's
const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");");
+ } else {
+ shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");");
}
std::string texture = "textureGather(" + sampler + ", coords, " +