Move finalization code to main

This commit is contained in:
gdkchan 2018-06-27 22:20:54 -03:00
parent 0953469aa1
commit db3d691860

View file

@ -334,6 +334,14 @@ namespace Ryujinx.Graphics.Gal.Shader
SB.AppendLine(IdentationStr + DeclInfo.Name + " = " + Attr.Name + Swizzle + ";");
}
if (Decl.ShaderType == GalShaderType.Vertex)
{
SB.AppendLine(IdentationStr + "gl_Position.xy *= flip;");
SB.AppendLine(IdentationStr + GlslDecl.PositionOutAttrName + " = gl_Position;");
SB.AppendLine(IdentationStr + GlslDecl.PositionOutAttrName + ".w = 1;");
}
SB.AppendLine("}");
}
@ -476,18 +484,6 @@ namespace Ryujinx.Graphics.Gal.Shader
continue;
}
else if (Op.Inst == ShaderIrInst.Exit)
{
//Do everything that needs to be done before
//the shader ends here.
if (Decl.ShaderType == GalShaderType.Vertex)
{
SB.AppendLine(Identation + "gl_Position.xy *= flip;");
SB.AppendLine(Identation + GlslDecl.PositionOutAttrName + " = gl_Position;");
SB.AppendLine(Identation + GlslDecl.PositionOutAttrName + ".w = 1;");
}
}
SB.AppendLine(Identation + GetSrcExpr(Op, true) + ";");
}