From c26ddd6259796e5b0b187989ce3e21b52edb00a8 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 23 Jun 2018 02:00:44 -0300 Subject: Fix 3 graphics related issues (#180) * Fix 3 graphics related bugs * OGLShader shouldn't be public (yet) --- Ryujinx.HLE/Gpu/TextureFactory.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Ryujinx.HLE/Gpu/TextureFactory.cs') diff --git a/Ryujinx.HLE/Gpu/TextureFactory.cs b/Ryujinx.HLE/Gpu/TextureFactory.cs index 9a92a016..94c6eb18 100644 --- a/Ryujinx.HLE/Gpu/TextureFactory.cs +++ b/Ryujinx.HLE/Gpu/TextureFactory.cs @@ -41,6 +41,17 @@ namespace Ryujinx.HLE.Gpu TextureSwizzle Swizzle = (TextureSwizzle)((Tic[2] >> 21) & 7); + if (Swizzle == TextureSwizzle.BlockLinear || + Swizzle == TextureSwizzle.BlockLinearColorKey) + { + TextureAddress &= ~0x1ffL; + } + else if (Swizzle == TextureSwizzle.Pitch || + Swizzle == TextureSwizzle.PitchColorKey) + { + TextureAddress &= ~0x1fL; + } + int Pitch = (Tic[3] & 0xffff) << 5; int BlockHeightLog2 = (Tic[3] >> 3) & 7; -- cgit v1.2.3