mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Use a same-everywhere quick hash for now.
This commit is contained in:
parent
4f3bac1b0a
commit
f039259a1a
3 changed files with 6 additions and 1 deletions
|
@ -160,7 +160,7 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, GETextureForm
|
|||
const u32 *checkp = (const u32 *)Memory::GetPointer(addr);
|
||||
switch (hash_) {
|
||||
case ReplacedTextureHash::QUICK:
|
||||
return DoQuickTexHash(checkp, sizeInRAM);
|
||||
return StableQuickTexHash(checkp, sizeInRAM);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -301,6 +301,7 @@ void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32
|
|||
#ifndef _M_SSE
|
||||
#ifndef ARM64
|
||||
QuickTexHashFunc DoQuickTexHash = &QuickTexHashBasic;
|
||||
QuickTexHashFunc StableQuickTexHash = &QuickTexHashNonSSE;
|
||||
UnswizzleTex16Func DoUnswizzleTex16 = &DoUnswizzleTex16Basic;
|
||||
ReliableHash32Func DoReliableHash32 = &XXH32;
|
||||
ReliableHash64Func DoReliableHash64 = &XXH64;
|
||||
|
@ -312,6 +313,7 @@ void SetupTextureDecoder() {
|
|||
#ifdef HAVE_ARMV7
|
||||
if (cpu_info.bNEON) {
|
||||
DoQuickTexHash = &QuickTexHashNEON;
|
||||
StableQuickTexHash = &QuickTexHashNEON;
|
||||
DoUnswizzleTex16 = &DoUnswizzleTex16NEON;
|
||||
#ifndef IOS
|
||||
// Not sure if this is safe on iOS, it's had issues with xxhash.
|
||||
|
|
|
@ -39,6 +39,7 @@ void DoSwizzleTex16(const u32 *ysrcp, u8 *texptr, int bxc, int byc, u32 pitch);
|
|||
#if defined(_M_SSE)
|
||||
u32 QuickTexHashSSE2(const void *checkp, u32 size);
|
||||
#define DoQuickTexHash QuickTexHashSSE2
|
||||
#define StableQuickTexHash QuickTexHashSSE2
|
||||
|
||||
// Pitch must be aligned to 16 bits (as is the case on a PSP)
|
||||
void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch);
|
||||
|
@ -59,6 +60,7 @@ typedef u32 ReliableHashType;
|
|||
// For ARM64, NEON is mandatory, so we also statically link.
|
||||
#elif defined(ARM64)
|
||||
#define DoQuickTexHash QuickTexHashNEON
|
||||
#define StableQuickTexHash QuickTexHashNEON
|
||||
#define DoUnswizzleTex16 DoUnswizzleTex16NEON
|
||||
#define DoReliableHash32 ReliableHash32NEON
|
||||
|
||||
|
@ -71,6 +73,7 @@ typedef u64 ReliableHashType;
|
|||
#else
|
||||
typedef u32 (*QuickTexHashFunc)(const void *checkp, u32 size);
|
||||
extern QuickTexHashFunc DoQuickTexHash;
|
||||
extern QuickTexHashFunc StableQuickTexHash;
|
||||
|
||||
typedef void (*UnswizzleTex16Func)(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch);
|
||||
extern UnswizzleTex16Func DoUnswizzleTex16;
|
||||
|
|
Loading…
Add table
Reference in a new issue