From db3d69186021c6fe9eca55d86121da099d614f1d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 27 Jun 2018 22:20:54 -0300 Subject: [PATCH] Move finalization code to main --- Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index b58025d617..53b3589824 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -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) + ";"); }