From 8261db61d48166443c6eec6ce217f21aa7835a07 Mon Sep 17 00:00:00 2001 From: Darabat Date: Fri, 3 Aug 2018 22:53:28 -0300 Subject: [PATCH 1/2] Update GlslDecompiler.cs --- Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index a338f40413..e5b4978d00 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -297,7 +297,7 @@ namespace Ryujinx.Graphics.Gal.Shader { if (DeclInfo.Index >= 0) { - SB.AppendLine("layout (location = " + DeclInfo.Index + ") " + InOut + " " + GetDecl(DeclInfo) + ";"); + SB.AppendLine("layout (location = " + DeclInfo.Index + ") " + InOut + " " + "vec4" + ";"); Count++; } @@ -1258,4 +1258,4 @@ namespace Ryujinx.Graphics.Gal.Shader throw new ArgumentException(nameof(Node)); } } -} \ No newline at end of file +} From 413665a941bd33d33135561658cf6ec758a48768 Mon Sep 17 00:00:00 2001 From: Darabat Date: Fri, 3 Aug 2018 23:51:57 -0300 Subject: [PATCH 2/2] Forcing shader generation into using vec4 to prevent specific crashes --- Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index e5b4978d00..0594380f89 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -297,7 +297,7 @@ namespace Ryujinx.Graphics.Gal.Shader { if (DeclInfo.Index >= 0) { - SB.AppendLine("layout (location = " + DeclInfo.Index + ") " + InOut + " " + "vec4" + ";"); + SB.AppendLine("layout (location = " + DeclInfo.Index + ") " + InOut + " " + "vec4 " + DeclInfo.Name + ";"); Count++; } @@ -370,7 +370,7 @@ namespace Ryujinx.Graphics.Gal.Shader ShaderDeclInfo DeclInfo = KV.Value; - string Swizzle = ".xyzw".Substring(0, DeclInfo.Size + 1); + string Swizzle = ".xyzw"; if (Decl.ShaderType == GalShaderType.Geometry) { @@ -418,7 +418,7 @@ namespace Ryujinx.Graphics.Gal.Shader ShaderDeclInfo DeclInfo = KV.Value; - string Swizzle = ".xyzw".Substring(0, DeclInfo.Size + 1); + string Swizzle = ".xyzw"; string Name = Attr.Name;