From e0c20dab937b47dd5701af1c91ed1bd2a2088cbf Mon Sep 17 00:00:00 2001 From: Thog Date: Sun, 9 Dec 2018 16:51:42 +0100 Subject: [PATCH] Fix shader compilation error for TLD4.AOFFI with no DC --- Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index 0c9ef87f7e..621df82018 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -1438,7 +1438,13 @@ namespace Ryujinx.Graphics.Gal.Shader if ((Suffix & TextureInstructionSuffix.AOffI) != 0) { string Offset = GetTextureOffset(Meta, "floatBitsToInt((" + GetOperExpr(Op, Meta.Offset) + "))", 8, 0x3F); - return "textureGatherOffset(" + Sampler + ", " + Coords + ", " + Comp + ", " + Offset + ")" + ChString; + + if ((Suffix & TextureInstructionSuffix.DC) != 0) + { + return "textureGatherOffset(" + Sampler + ", " + Coords + ", " + Comp + ", " + Offset + ")" + ChString; + } + + return "textureGatherOffset(" + Sampler + ", " + Coords + ", " + Offset + ", " + Comp + ")" + ChString; } // TODO: Support PTP else if ((Suffix & TextureInstructionSuffix.PTP) != 0)