From 49c3d94a823ee26374de61894e9dc7e9831b722b Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Sun, 22 Jul 2018 05:17:45 +0200 Subject: [PATCH] correct Read12Bpp function --- Ryujinx.HLE/Gpu/Texture/TextureReader.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/Gpu/Texture/TextureReader.cs b/Ryujinx.HLE/Gpu/Texture/TextureReader.cs index b95a690690..450ebb6091 100644 --- a/Ryujinx.HLE/Gpu/Texture/TextureReader.cs +++ b/Ryujinx.HLE/Gpu/Texture/TextureReader.cs @@ -279,9 +279,11 @@ namespace Ryujinx.HLE.Gpu.Texture { long Offset = (uint)Swizzle.GetSwizzleOffset(X, Y); - long Pixel = CpuMem.ReadInt64Unchecked(Position + Offset); + long PxLow = CpuMem.ReadInt64Unchecked(Position + Offset); + int PxHigh = CpuMem.ReadInt32Unchecked(Position + Offset + 8); - *(long*)(BuffPtr + OutOffs) = Pixel; + *(long*)(BuffPtr + OutOffs) = PxLow; + *(int*)(BuffPtr + OutOffs + 8) = PxHigh; OutOffs += 12; }