[Scummvm-git-logs] scummvm master -> 12cf92dec58b2e2ceb2d01f243a91fcc3b611813
lephilousophe
noreply at scummvm.org
Sat Feb 1 18:13:05 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ffe33de533 CONFIGURE: Fix compiler version checks
859a8e06ad GRAPHICS: Also enable NEON codepath if compiler builds with NEON enabled
12cf92dec5 ANDROID: Enable NEON by default
Commit: ffe33de533b021bce27ebc30fc6e6af89f45436a
https://github.com/scummvm/scummvm/commit/ffe33de533b021bce27ebc30fc6e6af89f45436a
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-01T18:06:56+01:00
Commit Message:
CONFIGURE: Fix compiler version checks
The checks were too strict compared to the targeted versions.
In addition, for GCC on ARM, the NEON target gating was introduced later
than for x86.
Changed paths:
configure
diff --git a/configure b/configure
index 902355c5f79..294c4f6e585 100755
--- a/configure
+++ b/configure
@@ -7149,8 +7149,8 @@ case $_host_cpu in
fi
_ext_neon=no
# SSE2 is always available on x86_64
- if ! (test "$have_clang" = yes && (test $_clang_major -gt 5 || (test $_clang_major -eq 5 && test $_clang_minor -gt 0))) &&
- ! (test "$have_gcc" = yes && (test $_cxx_major -gt 4 || (test $_cxx_major -eq 4 && test $_cxx_minor -gt 9))); then
+ if ! (test "$have_clang" = yes && (test $_clang_major -gt 5 || (test $_clang_major -eq 5 && test $_clang_minor -ge 0))) &&
+ ! (test "$have_gcc" = yes && (test $_cxx_major -gt 4 || (test $_cxx_major -eq 4 && test $_cxx_minor -ge 9))); then
# Need GCC 4.9+ or Clang 5.0+ for target pragma
_ext_avx2=no
fi
@@ -7163,8 +7163,8 @@ case $_host_cpu in
_ext_avx2=no
fi
_ext_neon=no
- if ! (test "$have_clang" = yes && (test $_clang_major -gt 5 || (test $_clang_major -eq 5 && test $_clang_minor -gt 0))) &&
- ! (test "$have_gcc" = yes && (test $_cxx_major -gt 4 || (test $_cxx_major -eq 4 && test $_cxx_minor -gt 9))); then
+ if ! (test "$have_clang" = yes && (test $_clang_major -gt 5 || (test $_clang_major -eq 5 && test $_clang_minor -ge 0))) &&
+ ! (test "$have_gcc" = yes && (test $_cxx_major -gt 4 || (test $_cxx_major -eq 4 && test $_cxx_minor -ge 9))); then
# Need GCC 4.9+ or Clang 5.0+ for target pragma
_ext_sse2=no
_ext_avx2=no
@@ -7184,9 +7184,9 @@ case $_host_cpu in
fi
_ext_sse2=no
_ext_avx2=no
- if ! (test "$have_clang" = yes && (test $_clang_major -gt 19 || (test $_clang_major -eq 19 && test $_clang_minor -gt 1))) &&
- ! (test "$have_gcc" = yes && (test $_cxx_major -gt 4 || (test $_cxx_major -eq 4 && test $_cxx_minor -gt 9))); then
- # Need GCC 4.9+ or Clang 19.1+ for target pragma
+ if ! (test "$have_clang" = yes && (test $_clang_major -gt 19 || (test $_clang_major -eq 19 && test $_clang_minor -ge 1))) &&
+ ! (test "$have_gcc" = yes && (test $_cxx_major -gt 6 || (test $_cxx_major -eq 6 && test $_cxx_minor -ge 1))); then
+ # Need GCC 6.1+ or Clang 19.1+ for target pragma
_ext_neon=no
fi
;;
Commit: 859a8e06adf3c6583d477e9fd1eb87d3adbe36f0
https://github.com/scummvm/scummvm/commit/859a8e06adf3c6583d477e9fd1eb87d3adbe36f0
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-01T18:06:56+01:00
Commit Message:
GRAPHICS: Also enable NEON codepath if compiler builds with NEON enabled
This will allow to build with NEON on platforms using an old compiler
but with NEON enabled for all translation units.
Changed paths:
configure
engines/ags/lib/allegro/surface_neon.cpp
graphics/blit/blit-neon.cpp
diff --git a/configure b/configure
index 294c4f6e585..d9b626bef01 100755
--- a/configure
+++ b/configure
@@ -7184,9 +7184,13 @@ case $_host_cpu in
fi
_ext_sse2=no
_ext_avx2=no
- if ! (test "$have_clang" = yes && (test $_clang_major -gt 19 || (test $_clang_major -eq 19 && test $_clang_minor -ge 1))) &&
+
+ if ! (test "$_ext_neon" = no) &&
+ ! (cc_check_define __ARM_NEON) &&
+ ! (test "$have_clang" = yes && (test $_clang_major -gt 19 || (test $_clang_major -eq 19 && test $_clang_minor -ge 1))) &&
! (test "$have_gcc" = yes && (test $_cxx_major -gt 6 || (test $_cxx_major -eq 6 && test $_cxx_minor -ge 1))); then
# Need GCC 6.1+ or Clang 19.1+ for target pragma
+ # Don't disable if NEON is already enabled in the compiler
_ext_neon=no
fi
;;
diff --git a/engines/ags/lib/allegro/surface_neon.cpp b/engines/ags/lib/allegro/surface_neon.cpp
index e66bae657d2..49507e50517 100644
--- a/engines/ags/lib/allegro/surface_neon.cpp
+++ b/engines/ags/lib/allegro/surface_neon.cpp
@@ -33,7 +33,7 @@
#include <arm_neon.h>
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__ARM_NEON)
#if defined(__clang__)
#pragma clang attribute push (__attribute__((target("neon"))), apply_to=function)
@@ -42,7 +42,7 @@
#pragma GCC target("fpu=neon")
#endif
-#endif // !defined(__aarch64__)
+#endif // !defined(__aarch64__) && !defined(__ARM_NEON)
namespace AGS3 {
@@ -976,7 +976,7 @@ template void BITMAP::drawNEON<true>(DrawInnerArgs &);
} // namespace AGS3
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__ARM_NEON)
#if defined(__clang__)
#pragma clang attribute pop
@@ -984,6 +984,6 @@ template void BITMAP::drawNEON<true>(DrawInnerArgs &);
#pragma GCC pop_options
#endif
-#endif // !defined(__aarch64__)
+#endif // !defined(__aarch64__) && !defined(__ARM_NEON)
#endif // SCUMMVM_NEON
diff --git a/graphics/blit/blit-neon.cpp b/graphics/blit/blit-neon.cpp
index b35a22827c3..eac78aea87c 100644
--- a/graphics/blit/blit-neon.cpp
+++ b/graphics/blit/blit-neon.cpp
@@ -28,7 +28,7 @@
#include <arm_neon.h>
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__ARM_NEON)
#if defined(__clang__)
#pragma clang attribute push (__attribute__((target("neon"))), apply_to=function)
@@ -37,7 +37,7 @@
#pragma GCC target("fpu=neon")
#endif
-#endif // !defined(__aarch64__)
+#endif // !defined(__aarch64__) && !defined(__ARM_NEON)
namespace Graphics {
@@ -326,7 +326,7 @@ void BlendBlit::blitNEON(Args &args, const TSpriteBlendMode &blendMode, const Al
} // end of namespace Graphics
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__ARM_NEON)
#if defined(__clang__)
#pragma clang attribute pop
@@ -334,6 +334,6 @@ void BlendBlit::blitNEON(Args &args, const TSpriteBlendMode &blendMode, const Al
#pragma GCC pop_options
#endif
-#endif // !defined(__aarch64__)
+#endif // !defined(__aarch64__) && !defined(__ARM_NEON)
#endif // SCUMMVM_NEON
Commit: 12cf92dec58b2e2ceb2d01f243a91fcc3b611813
https://github.com/scummvm/scummvm/commit/12cf92dec58b2e2ceb2d01f243a91fcc3b611813
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-01T18:06:56+01:00
Commit Message:
ANDROID: Enable NEON by default
This will allow better performance for the vast majority of older
Android devices.
The Android devices lacking NEON support are really rare and will be
able to make use of an alternative APK compiled using
--disable-ext-neon.
Changed paths:
configure
diff --git a/configure b/configure
index d9b626bef01..f886a85e2ed 100755
--- a/configure
+++ b/configure
@@ -2902,12 +2902,16 @@ case $_host_os in
android)
case $_host in
android-arm-v7a | android-armeabi-v7a)
- # Disable NEON for older devices (like with Tegra 2)
- append_var CXXFLAGS "-mfpu=vfp"
+ # Enable NEON by default
+ # For older devices (like Tegra 2), pass --disable-ext-neon
+ if test "$_ext_neon" = no ; then
+ append_var CXXFLAGS "-mfpu=vfp"
+ else
+ append_var CXXFLAGS "-mfpu=neon"
+ _ext_neon=yes
+ fi
# This is really old CPU but might be still used with android 4.1, it slightly increases code size and decreases performance.
append_var LDFLAGS "-Wl,--fix-cortex-a8"
- # Allow NEON optimized code after runtime detection
- _ext_neon=yes
ABI="armeabi-v7a"
;;
android-arm64-v8a)
More information about the Scummvm-git-logs
mailing list