Decode 16-bit textures a bit more directly.

Improves performance in God of War.
This commit is contained in:
Unknown W. Brackets committed 2013-06-30 20:36:53 -07:00
1 parent 386d51081c
commit 79116da82d
1 file changed
+3 -4
+3 -4
View File
@@ -1302,14 +1302,13 @@ void *TextureCache::DecodeTextureLevel(u8 format, u8 clutformat, int level, u32
int len = std::max(bufw, w) * h;
tmpTexBuf16.resize(len);
tmpTexBufRearrange.resize(len);
Memory::Memcpy(tmpTexBuf16.data(), texaddr, len * sizeof(u16));
finalBuf = tmpTexBuf16.data();
}
else {
ConvertColors(finalBuf, Memory::GetPointer(texaddr), dstFmt, bufw * h);
} else {
tmpTexBuf32.resize(std::max(bufw, w) * h);
finalBuf = UnswizzleFromMem(texaddr, bufw, 2, level);
ConvertColors(finalBuf, finalBuf, dstFmt, bufw * h);
}
ConvertColors(finalBuf, finalBuf, dstFmt, bufw * h);
break;
case GE_TFMT_8888: