From e8519a8a9b87cf900851851a4ac9d3a84a566a3b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 31 Jan 2013 00:48:26 -0800 Subject: [PATCH] Walk a pointer in texture reading too. --- GPU/GLES/TextureCache.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 5bddcafbb7..9ed7fbbe13 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -723,13 +723,12 @@ void TextureCache::SetTexture() { u32 clutSharingOff = 0;//gstate.mipmapShareClut ? 0 : level * 16; texByteAlign = 2; if (!(gstate.texmode & 1)) { - u32 addr = texaddr; + u8 *addr = Memory::GetPointer(texaddr); for (int i = 0; i < bufw * h; i += 2) { - u8 index = Memory::ReadUnchecked_U8(addr); + u8 index = *addr++; tmpTexBuf16[i + 0] = clut[GetClutIndex((index >> 0) & 0xf) + clutSharingOff]; tmpTexBuf16[i + 1] = clut[GetClutIndex((index >> 4) & 0xf) + clutSharingOff]; - addr++; } } else { UnswizzleFromMem(texaddr, 0, level); @@ -753,13 +752,12 @@ void TextureCache::SetTexture() { const u32 *clut = clutBuf32; u32 clutSharingOff = 0;//gstate.mipmapShareClut ? 0 : level * 16; if (!(gstate.texmode & 1)) { - u32 addr = texaddr; + u8 *addr = Memory::GetPointer(texaddr); for (int i = 0; i < bufw * h; i += 2) { - u8 index = Memory::ReadUnchecked_U8(addr); + u8 index = *addr++; tmpTexBuf32[i + 0] = clut[GetClutIndex((index >> 0) & 0xf) + clutSharingOff]; tmpTexBuf32[i + 1] = clut[GetClutIndex((index >> 4) & 0xf) + clutSharingOff]; - addr++; } } else { u32 pixels = bufw * h;