mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Check the entire texture again, fixes wrong tex.
Not sure why, but only on Android. Also faster on Windows.
This commit is contained in:
parent
b548fe0aa6
commit
8e51ce1beb
1 changed files with 3 additions and 10 deletions
|
@ -653,18 +653,11 @@ static inline u32 MiniHash(const u32 *ptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u32 QuickTexHash(u32 addr, int bufw, int w, int h, u32 format) {
|
static inline u32 QuickTexHash(u32 addr, int bufw, int w, int h, u32 format) {
|
||||||
int pixToBytes = (bitsPerPixel[format < 11 ? format : 0] + 7) / 8;
|
u32 sizeInRAM = (bitsPerPixel[format < 11 ? format : 0] * bufw * h / 2) / 8;
|
||||||
int w32 = (w * pixToBytes + 3) / 4;
|
|
||||||
int pad32 = ((bufw * pixToBytes + 3) / 4) - w32;
|
|
||||||
|
|
||||||
const u32 *checkp = (const u32 *) Memory::GetPointer(addr);
|
const u32 *checkp = (const u32 *) Memory::GetPointer(addr);
|
||||||
u32 check = 0;
|
u32 check = 0;
|
||||||
for (int y = 0; y < h; ++y) {
|
for (u32 i = 0; i < (sizeInRAM * 2) / 4; ++i)
|
||||||
for (int x = 0; x < w32; ++x) {
|
|
||||||
check += *checkp++;
|
check += *checkp++;
|
||||||
}
|
|
||||||
checkp += pad32;
|
|
||||||
}
|
|
||||||
|
|
||||||
return check;
|
return check;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue