mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-15 07:15:01 +00:00
gl_shader_decompiler: Fix GLSL compiler error with KIL instruction.
This commit is contained in:
parent
a921d22545
commit
c68aa65226
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue