diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs index e65a47239b..baa03a48f3 100644 --- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs +++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs @@ -1253,7 +1253,7 @@ namespace Ryujinx.Graphics.Gal.Shader Lod = GetOperExpr(Op, Meta.LevelOfDetail); } - if ((Suffix & TextureInstructionSuffix.AOFFI) != 0) + if ((Suffix & TextureInstructionSuffix.AOffI) != 0) { return "texelFetchOffset(" + Sampler + ", " + Coords + ", " + Lod + ", " + GetOperExpr(Op, Meta.Offset) + ")." + Ch; } @@ -1436,7 +1436,7 @@ namespace Ryujinx.Graphics.Gal.Shader } // TODO: Support AOFFI - if ((Suffix & TextureInstructionSuffix.AOFFI) != 0) + if ((Suffix & TextureInstructionSuffix.AOffI) != 0) { throw new NotImplementedException(); } @@ -1460,7 +1460,7 @@ namespace Ryujinx.Graphics.Gal.Shader // TODO: Support LBA and LLA if ((Suffix & TextureInstructionSuffix.LZ) != 0) { - if ((Suffix & TextureInstructionSuffix.AOFFI) != 0) + if ((Suffix & TextureInstructionSuffix.AOffI) != 0) { string Offset = GetTextureOffset(Meta, "floatBitsToInt((" + GetOperExpr(Op, Meta.Offset) + "))"); @@ -1471,7 +1471,7 @@ namespace Ryujinx.Graphics.Gal.Shader } else if ((Suffix & TextureInstructionSuffix.LB) != 0) { - if ((Suffix & TextureInstructionSuffix.AOFFI) != 0) + if ((Suffix & TextureInstructionSuffix.AOffI) != 0) { string Offset = GetTextureOffset(Meta, "floatBitsToInt((" + GetOperExpr(Op, Meta.Offset) + "))"); @@ -1482,7 +1482,7 @@ namespace Ryujinx.Graphics.Gal.Shader } else if ((Suffix & TextureInstructionSuffix.LL) != 0) { - if ((Suffix & TextureInstructionSuffix.AOFFI) != 0) + if ((Suffix & TextureInstructionSuffix.AOffI) != 0) { string Offset = GetTextureOffset(Meta, "floatBitsToInt((" + GetOperExpr(Op, Meta.Offset) + "))"); @@ -1491,7 +1491,7 @@ namespace Ryujinx.Graphics.Gal.Shader return "textureLod(" + Sampler + ", " + Coords + ", " + GetOperExpr(Op, Meta.LevelOfDetail) + ")" + ChString; } - else if (Suffix == TextureInstructionSuffix.AOFFI) + else if (Suffix == TextureInstructionSuffix.AOffI) { string Offset = GetTextureOffset(Meta, "floatBitsToInt((" + GetOperExpr(Op, Meta.Offset) + "))"); diff --git a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs index 78b8ea0fd0..9c4c6453d1 100644 --- a/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs +++ b/Ryujinx.Graphics/Gal/Shader/ShaderDecodeMem.cs @@ -232,7 +232,7 @@ namespace Ryujinx.Graphics.Gal.Shader bool IsOffset = OpCode.Read(0x36); if (IsOffset) - Suffix |= TextureInstructionSuffix.AOFFI; + Suffix |= TextureInstructionSuffix.AOffI; EmitTex(Block, OpCode, Suffix, GprHandle: false); } @@ -270,7 +270,7 @@ namespace Ryujinx.Graphics.Gal.Shader bool IsOffset = OpCode.Read(0x23); if (IsOffset) - Suffix |= TextureInstructionSuffix.AOFFI; + Suffix |= TextureInstructionSuffix.AOffI; EmitTex(Block, OpCode, Suffix, GprHandle: true); } @@ -338,7 +338,7 @@ namespace Ryujinx.Graphics.Gal.Shader OperBIndex++; } - if ((TextureInstructionSuffix & TextureInstructionSuffix.AOFFI) != 0) + if ((TextureInstructionSuffix & TextureInstructionSuffix.AOffI) != 0) { Offset = OpCode.Gpr20(); Offset.Index += OperBIndex; @@ -446,7 +446,7 @@ namespace Ryujinx.Graphics.Gal.Shader case 0: case 0x4: case 0x8: - Suffix = TextureInstructionSuffix.LZ | TextureInstructionSuffix.AOFFI; + Suffix = TextureInstructionSuffix.LZ | TextureInstructionSuffix.AOffI; break; case 0xc: Suffix = TextureInstructionSuffix.LZ | TextureInstructionSuffix.MZ; @@ -460,7 +460,7 @@ namespace Ryujinx.Graphics.Gal.Shader Suffix = TextureInstructionSuffix.LL; break; case 0x18: - Suffix = TextureInstructionSuffix.LL | TextureInstructionSuffix.AOFFI; + Suffix = TextureInstructionSuffix.LL | TextureInstructionSuffix.AOffI; break; default: throw new InvalidOperationException($"Invalid Suffix for TLDS instruction {RawSuffix}"); @@ -483,7 +483,7 @@ namespace Ryujinx.Graphics.Gal.Shader Suffix = TextureInstructionSuffix.None; break; case 0x4: - Suffix = TextureInstructionSuffix.AOFFI; + Suffix = TextureInstructionSuffix.AOffI; break; case 0x8: Suffix = TextureInstructionSuffix.PTP; @@ -516,7 +516,7 @@ namespace Ryujinx.Graphics.Gal.Shader if (IsOffset) { - Suffix |= TextureInstructionSuffix.AOFFI; + Suffix |= TextureInstructionSuffix.AOffI; } if (IsShadow) @@ -612,7 +612,7 @@ namespace Ryujinx.Graphics.Gal.Shader OperBIndex++; } - if ((TextureInstructionSuffix & TextureInstructionSuffix.AOFFI) != 0) + if ((TextureInstructionSuffix & TextureInstructionSuffix.AOffI) != 0) { Offset = OpCode.Gpr20(); Offset.Index += OperBIndex; @@ -806,7 +806,7 @@ namespace Ryujinx.Graphics.Gal.Shader } } - if ((TextureInstructionSuffix & TextureInstructionSuffix.AOFFI) != 0) + if ((TextureInstructionSuffix & TextureInstructionSuffix.AOffI) != 0) { Offset = OpCode.Gpr20(); Offset.Index += OperBIndex; diff --git a/Ryujinx.Graphics/Graphics3d/Texture/ImageUtils.cs b/Ryujinx.Graphics/Graphics3d/Texture/ImageUtils.cs index 22e04f3938..9e60a22ef9 100644 --- a/Ryujinx.Graphics/Graphics3d/Texture/ImageUtils.cs +++ b/Ryujinx.Graphics/Graphics3d/Texture/ImageUtils.cs @@ -1,10 +1,9 @@ using ChocolArm64.Memory; +using OpenTK.Graphics.OpenGL; using Ryujinx.Graphics.Gal; using Ryujinx.Graphics.Memory; using System; using System.Collections.Generic; -using OpenTK.Graphics.OpenGL; -using System.Diagnostics; namespace Ryujinx.Graphics.Texture { diff --git a/Ryujinx.Graphics/Texture/TextureInstructionSuffix.cs b/Ryujinx.Graphics/Texture/TextureInstructionSuffix.cs index 9ef7b617ff..bcb64af0be 100644 --- a/Ryujinx.Graphics/Texture/TextureInstructionSuffix.cs +++ b/Ryujinx.Graphics/Texture/TextureInstructionSuffix.cs @@ -12,7 +12,7 @@ namespace Ryujinx.Graphics.Texture LBA = 0x20, // Load Bias with OperA? Auto? LLA = 0x40, // Load LOD with OperA? Auto? DC = 0x80, // Depth Compare - AOFFI = 0x100, // Offset + AOffI = 0x100, // Offset MZ = 0x200, // Multisample Zero? PTP = 0x400 // ??? }