diff --git a/GPU/Common/TextureDecoder.cpp b/GPU/Common/TextureDecoder.cpp index c18495239a..80523aa554 100644 --- a/GPU/Common/TextureDecoder.cpp +++ b/GPU/Common/TextureDecoder.cpp @@ -207,9 +207,11 @@ void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 } #ifndef _M_SSE +#ifndef ARM64 QuickTexHashFunc DoQuickTexHash = &QuickTexHashBasic; UnswizzleTex16Func DoUnswizzleTex16 = &DoUnswizzleTex16Basic; ReliableHash32Func DoReliableHash32 = &XXH32; +#endif ReliableHash64Func DoReliableHash64 = &XXH64; #endif diff --git a/GPU/Common/TextureDecoder.h b/GPU/Common/TextureDecoder.h index af53781c78..0d07cb598c 100644 --- a/GPU/Common/TextureDecoder.h +++ b/GPU/Common/TextureDecoder.h @@ -21,10 +21,12 @@ #include "Core/MemMap.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" +#include "GPU/Common/TextureDecoderNEON.h" void SetupTextureDecoder(); -#ifdef _M_SSE +// For SSE, we statically link the SSE2 algorithms. +#if defined(_M_SSE) u32 QuickTexHashSSE2(const void *checkp, u32 size); #define DoQuickTexHash QuickTexHashSSE2 @@ -42,6 +44,20 @@ typedef u64 ReliableHashType; #define DoReliableHash XXH32 typedef u32 ReliableHashType; #endif + +// For ARM64, NEON is mandatory, so we also statically link. +#elif defined(ARM64) +#define DoQuickTexHash QuickTexHashNEON +#define DoUnswizzleTex16 DoUnswizzleTex16NEON +#define DoReliableHash32 ReliableHash32NEON + +// TODO: NEON version of this too? Since we're 64, might be faster. +typedef u64 (*ReliableHash64Func)(const void *input, size_t len, u64 seed); +extern ReliableHash64Func DoReliableHash64; + +#define DoReliableHash DoReliableHash32 +typedef u32 ReliableHashType; + #else typedef u32 (*QuickTexHashFunc)(const void *checkp, u32 size); extern QuickTexHashFunc DoQuickTexHash; diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 0170171c96..0f401484d9 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -82,6 +82,7 @@ ARCH_FILES := \ $(SRC)/Core/Util/AudioFormatNEON.cpp \ $(SRC)/Common/Arm64Emitter.cpp \ $(SRC)/Common/ArmCPUDetect.cpp \ + $(SRC)/Common/ColorConvNEON.cpp \ $(SRC)/Core/MIPS/ARM64/Arm64CompALU.cpp \ $(SRC)/Core/MIPS/ARM64/Arm64CompBranch.cpp \ $(SRC)/Core/MIPS/ARM64/Arm64CompFPU.cpp \