diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 85297bd00b234ce1b14dbd35b62ce9e68cb10aec..d21daf28a4da92b1c8e209a209ca829cef760679 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:
             }
             case OpCode::Id::KIL: {
                 ASSERT(instr.flow.cond == Tegra::Shader::FlowCondition::Always);
+
+                // Enclose "discard" in a conditional, so that GLSL compilation does not complain
+                // about unexecuted instructions that may follow this.
+                shader.AddLine("if (true) {");
+                ++shader.scope;
                 shader.AddLine("discard;");
+                --shader.scope;
+                shader.AddLine("}");
+
                 break;
             }
             case OpCode::Id::BRA: {