Fix shader compilation error for TLD4.AOFFI with no DC

This commit is contained in:
Thog 2018-12-09 16:51:42 +01:00
parent 6dc88c85c9
commit e0c20dab93
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6

View file

@ -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)