mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 12:47:46 +00:00
TexCache: Correct 16->32 for CLUT4 with shift.
This commit is contained in:
parent
17f6c00c3c
commit
bc53a0d7c4
@ -1683,7 +1683,12 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G
|
||||
// We simply expand the CLUT to 32-bit, then we deindex as usual. Probably the fastest way.
|
||||
const u16 *clut = GetCurrentRawClut<u16>() + clutSharingOffset;
|
||||
const int clutStart = gstate.getClutIndexStartPos();
|
||||
ConvertFormatToRGBA8888(clutformat, expandClut_ + clutStart, clut + clutStart, 16);
|
||||
if (gstate.getClutIndexShift() == 0 || gstate.getClutIndexMask() <= 16) {
|
||||
ConvertFormatToRGBA8888(clutformat, expandClut_ + clutStart, clut + clutStart, 16);
|
||||
} else {
|
||||
// To be safe for shifts and wrap around, convert the entire CLUT.
|
||||
ConvertFormatToRGBA8888(clutformat, expandClut_, clut, 512);
|
||||
}
|
||||
fullAlphaMask = 0xFF000000;
|
||||
for (int y = 0; y < h; ++y) {
|
||||
DeIndexTexture4<u32>((u32 *)(out + outPitch * y), texptr + (bufw * y) / 2, w, expandClut_, &alphaSum);
|
||||
|
Loading…
x
Reference in New Issue
Block a user