Move finalization code to main
This commit is contained in:
parent
0953469aa1
commit
db3d691860
1 changed files with 8 additions and 12 deletions
|
@ -334,6 +334,14 @@ namespace Ryujinx.Graphics.Gal.Shader
|
||||||
SB.AppendLine(IdentationStr + DeclInfo.Name + " = " + Attr.Name + Swizzle + ";");
|
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("}");
|
SB.AppendLine("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,18 +484,6 @@ namespace Ryujinx.Graphics.Gal.Shader
|
||||||
|
|
||||||
continue;
|
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) + ";");
|
SB.AppendLine(Identation + GetSrcExpr(Op, true) + ";");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue