From b49067d165326b82dd64f9633553a1cf68e132b3 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 22 Nov 2020 02:00:16 +1000 Subject: [PATCH] Build: Fix Android armv8 performance regression --- android/app/build.gradle | 2 +- src/core/gpu_sw.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7bac3f3f7..050425ca8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -30,7 +30,7 @@ android { defaultConfig { externalNativeBuild { cmake { - arguments "-DCMAKE_BUILD_TYPE=Release -DANDROID_ARM_NEON=ON" + arguments "-DCMAKE_BUILD_TYPE=Release" abiFilters "arm64-v8a", "armeabi-v7a" } } diff --git a/src/core/gpu_sw.cpp b/src/core/gpu_sw.cpp index a38bdf40b..5a69c1cb8 100644 --- a/src/core/gpu_sw.cpp +++ b/src/core/gpu_sw.cpp @@ -11,8 +11,6 @@ Log_SetChannel(GPU_SW); #if defined(CPU_X64) #include -#elif defined(CPU_AARCH32) -#include #elif defined(CPU_AARCH64) #ifdef _MSC_VER #include @@ -157,7 +155,7 @@ ALWAYS_INLINE void CopyOutRow16(const u16 _mm_storeu_si128(reinterpret_cast<__m128i*>(dst_ptr), value); dst_ptr += 8; } -#elif defined(CPU_AARCH32) || defined(CPU_AARCH64) +#elif defined(CPU_AARCH64) const u32 aligned_width = Common::AlignDownPow2(width, 8); for (; col < aligned_width; col += 8) { @@ -197,7 +195,7 @@ ALWAYS_INLINE void CopyOutRow16(const u16* _mm_storeu_si128(reinterpret_cast<__m128i*>(dst_ptr), value); dst_ptr += 8; } -#elif defined(CPU_AARCH32) || defined(CPU_AARCH64) +#elif defined(CPU_AARCH64) const u32 aligned_width = Common::AlignDownPow2(width, 8); const uint16x8_t single_mask = vdupq_n_u16(0x1F); for (; col < aligned_width; col += 8)