summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-08-12 00:25:44 -0400
committerGravatar GitHub2018-08-12 00:25:44 -0400
commit3f81c38c6db050fda07208adb4e76538f08beb8c (patch)
treefb3ca7138265b62a374744a134ec569c566be532 /src
parentMerge pull request #1022 from bunnei/fix-splat (diff)
parentgl_shader_decompiler: Fix GLSL compiler error with KIL instruction. (diff)
downloadyuzu-3f81c38c6db050fda07208adb4e76538f08beb8c.tar.gz
yuzu-3f81c38c6db050fda07208adb4e76538f08beb8c.tar.xz
yuzu-3f81c38c6db050fda07208adb4e76538f08beb8c.zip
Merge pull request #1027 from bunnei/fix-kil
gl_shader_decompiler: Fix GLSL compiler error with KIL instruction.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 85297bd00..d21daf28a 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1667,7 +1667,15 @@ private:
1667 } 1667 }
1668 case OpCode::Id::KIL: { 1668 case OpCode::Id::KIL: {
1669 ASSERT(instr.flow.cond == Tegra::Shader::FlowCondition::Always); 1669 ASSERT(instr.flow.cond == Tegra::Shader::FlowCondition::Always);
1670
1671 // Enclose "discard" in a conditional, so that GLSL compilation does not complain
1672 // about unexecuted instructions that may follow this.
1673 shader.AddLine("if (true) {");
1674 ++shader.scope;
1670 shader.AddLine("discard;"); 1675 shader.AddLine("discard;");
1676 --shader.scope;
1677 shader.AddLine("}");
1678
1671 break; 1679 break;
1672 } 1680 }
1673 case OpCode::Id::BRA: { 1681 case OpCode::Id::BRA: {