mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-04 03:32:29 +00:00
Merge pull request #1543 from unknownbrackets/texcache
Mask clut indexes for > 8-bit clut indexes.
This commit is contained in:
commit
b5d6ba33b1
@ -243,8 +243,14 @@ inline void DeIndexTexture(ClutT *dest, const IndexT *indexed, int length, const
|
||||
const bool nakedIndex = (gstate.clutformat & ~3) == 0xC500FF00;
|
||||
|
||||
if (nakedIndex) {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
*dest++ = clut[*indexed++];
|
||||
if (sizeof(IndexT) == 1) {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
*dest++ = clut[*indexed++];
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
*dest++ = clut[(*indexed++) & 0xFF];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < length; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user