[Scummvm-git-logs] scummvm branch-2-9 -> de6afa17e3226f1d09d1be8875736ac176d57c47

lephilousophe noreply at scummvm.org
Mon Feb 3 11:40:40 UTC 2025


This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
25b733cdd6 ANDROID: Allocate enough stack
df4fbae2fd DIRECTOR: Don't allocate big objects in stack in SpaceMgr
669510bdcf NGI: Don't reopen the NGIArchive when reading a content
8a84bb31df DLC: Fix build
d18d0fd944 TETRAEDGE: Don't declare OpenGL with shaders as supported
d1b0ced726 CONFIGURE: Avoid using the Gold linker on non-mainstream archs, unless using --enable-gold
109d593f48 CONFIGURE: Fix compiler version checks
adcdfa9c80 GRAPHICS: Also enable NEON codepath if compiler builds with NEON enabled
de6afa17e3 ANDROID: Enable NEON by default


Commit: 25b733cdd63c82be78d1b56816f209f5198145fb
    https://github.com/scummvm/scummvm/commit/25b733cdd63c82be78d1b56816f209f5198145fb
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+01:00

Commit Message:
ANDROID: Allocate enough stack

Default stack allocation for Java thread is 1MB which is shared with
Java side.
On a traditional Linux, the main thread is often up to 8MB.

Changed paths:
    backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java


diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 9b969bbe9cc..ddea0574aed 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -1058,7 +1058,7 @@ public class ScummVMActivity extends Activity implements OnKeyboardVisibilityLis
 			_main_surface.setOnHoverListener(_mouseHelper);
 		}
 
-		_scummvm_thread = new Thread(_scummvm, "ScummVM");
+		_scummvm_thread = new Thread(null, _scummvm, "ScummVM", 8388608); // 8MB
 		_scummvm_thread.start();
 	}
 


Commit: df4fbae2fd98b9993390a4a7aef5ca1b399a88c8
    https://github.com/scummvm/scummvm/commit/df4fbae2fd98b9993390a4a7aef5ca1b399a88c8
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+01:00

Commit Message:
DIRECTOR: Don't allocate big objects in stack in SpaceMgr

The SpaceMgr objects (especially SpaceCollection) are pretty huge (over
1MB size) because they are made of HashMap which contain their object
pool.
These objects should have never been allocated on stack.
As the nodes are not existing, make sure they are allocated directly on
the heap using the getOrCreateVal call.
When needed, the result is recycled to avoid an extra lookup.

Changed paths:
    engines/director/lingo/xlibs/spacemgr.cpp


diff --git a/engines/director/lingo/xlibs/spacemgr.cpp b/engines/director/lingo/xlibs/spacemgr.cpp
index c9e9ba80996..61965195edd 100644
--- a/engines/director/lingo/xlibs/spacemgr.cpp
+++ b/engines/director/lingo/xlibs/spacemgr.cpp
@@ -217,7 +217,7 @@ void SpaceMgr::m_parseText(int nargs) {
 			me->_curNode = "";
 			me->_curView = "";
 			if (!(me->_spaceCollections.contains(me->_curSpaceCollection) && me->_checkForDups)) {
-				me->_spaceCollections[me->_curSpaceCollection] = SpaceCollection();
+				me->_spaceCollections.getOrCreateVal(me->_curSpaceCollection);
 			}
 		} else if (type == "SPACE") {
 			me->_curSpace = instruction.nextToken();
@@ -225,7 +225,7 @@ void SpaceMgr::m_parseText(int nargs) {
 			me->_curView = "";
 			SpaceCollection &sc = me->_spaceCollections.getVal(me->_curSpaceCollection);
 			if (!(sc.spaces.contains(me->_curSpaceCollection) && me->_checkForDups)) {
-				sc.spaces[me->_curSpace] = Space();
+				sc.spaces.getOrCreateVal(me->_curSpace);
 			}
 		} else if (type == "NODE") {
 			me->_curNode = instruction.nextToken();
@@ -233,7 +233,7 @@ void SpaceMgr::m_parseText(int nargs) {
 			SpaceCollection &sc = me->_spaceCollections.getVal(me->_curSpaceCollection);
 			Space &s = sc.spaces.getVal(me->_curSpace);
 			if (!(s.nodes.contains(me->_curNode) && me->_checkForDups)) {
-				s.nodes[me->_curNode] = Node();
+				s.nodes.getOrCreateVal(me->_curNode);
 			}
 		} else if (type == "VIEW") {
 			me->_curView = instruction.nextToken();
@@ -241,8 +241,7 @@ void SpaceMgr::m_parseText(int nargs) {
 			Space &s = sc.spaces.getVal(me->_curSpace);
 			Node &n = s.nodes.getVal(me->_curNode);
 			if (!(n.views.contains(me->_curView) && me->_checkForDups)) {
-				n.views[me->_curView] = View();
-				n.views[me->_curView].payload = instruction.nextToken();
+				n.views.getOrCreateVal(me->_curView).payload = instruction.nextToken();
 			}
 		} else if (type == "LLINK") {
 			Common::String target = instruction.nextToken();
@@ -252,8 +251,7 @@ void SpaceMgr::m_parseText(int nargs) {
 			Node &n = s.nodes.getVal(me->_curNode);
 			View &v = n.views.getVal(me->_curView);
 			if (!(v.llinks.contains(target) && me->_checkForDups)) {
-				v.llinks[target] = LLink();
-				v.llinks[target].payload = payload;
+				v.llinks.getOrCreateVal(target).payload = payload;
 			}
 		} else {
 			warning("SpaceMgr::m_parseText: Unhandled instruction %s", instructionBody.c_str());


Commit: 669510bdcf2c284a60e8d872a4abdd2fc0a72a22
    https://github.com/scummvm/scummvm/commit/669510bdcf2c284a60e8d872a4abdd2fc0a72a22
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+01:00

Commit Message:
NGI: Don't reopen the NGIArchive when reading a content

This makes the game perform poorly with Android SAF.
The file is open once at the init and we then seek in it to look for
contents.
It's how it works for other archives like Zip.

In the same time, cleanup the headers.

Changed paths:
    engines/ngi/ngiarchive.cpp
    engines/ngi/ngiarchive.h


diff --git a/engines/ngi/ngiarchive.cpp b/engines/ngi/ngiarchive.cpp
index a534d60ae1a..08419843fca 100644
--- a/engines/ngi/ngiarchive.cpp
+++ b/engines/ngi/ngiarchive.cpp
@@ -32,21 +32,21 @@
 
 namespace NGI {
 
-NGIArchive::NGIArchive(const Common::Path &filename) : _ngiFilename(filename) {
-	Common::File ngiFile;
-
-	if (!ngiFile.open(_ngiFilename)) {
+NGIArchive::NGIArchive(const Common::Path &filename) : _ngiFile(new Common::File()) {
+	if (!_ngiFile->open(filename)) {
 		warning("NGIArchive::NGIArchive(): Could not find the archive file");
+		delete _ngiFile;
+		_ngiFile = nullptr;
 		return;
 	}
 
-	ngiFile.seek(4, SEEK_SET);
+	_ngiFile->seek(4, SEEK_SET);
 
-	unsigned int count = ngiFile.readUint16LE(); // How many entries?
+	unsigned int count = _ngiFile->readUint16LE(); // How many entries?
 
-	ngiFile.seek(20, SEEK_SET);
+	_ngiFile->seek(20, SEEK_SET);
 
-	unsigned int key = ngiFile.readUint16LE();
+	unsigned int key = _ngiFile->readUint16LE();
 
 	byte key1, key2;
 
@@ -55,11 +55,11 @@ NGIArchive::NGIArchive(const Common::Path &filename) : _ngiFilename(filename) {
 
 	int fatSize = count * 32;
 
-	ngiFile.seek(32, SEEK_SET);
+	_ngiFile->seek(32, SEEK_SET);
 
 	byte *fat = (byte *)calloc(fatSize, 1);
 
-	ngiFile.read(fat, fatSize);
+	_ngiFile->read(fat, fatSize);
 
 	for (int i = 0; i < fatSize; i++) {
 		key1 = (key1 << 1) ^ key2;
@@ -97,6 +97,8 @@ NGIArchive::NGIArchive(const Common::Path &filename) : _ngiFilename(filename) {
 NGIArchive::~NGIArchive() {
 	debugC(0, kDebugLoading, "NGIArchive Destructor Called");
 	g_nmi->_currArchive = nullptr;
+
+	delete _ngiFile;
 }
 
 bool NGIArchive::hasFile(const Common::Path &path) const {
@@ -123,20 +125,18 @@ const Common::ArchiveMemberPtr NGIArchive::getMember(const Common::Path &path) c
 }
 
 Common::SeekableReadStream *NGIArchive::createReadStreamForMember(const Common::Path &path) const {
-	if (!_headers.contains(path)) {
+	if (!_ngiFile || !_headers.contains(path)) {
 		return nullptr;
 	}
 
 	NgiHeader *hdr = _headers[path].get();
 
-	Common::File archiveFile;
-	archiveFile.open(_ngiFilename);
-	archiveFile.seek(hdr->pos, SEEK_SET);
+	_ngiFile->seek(hdr->pos, SEEK_SET);
 
 	byte *data = (byte *)malloc(hdr->size);
 	assert(data);
 
-	int32 len = archiveFile.read(data, hdr->size);
+	int32 len = _ngiFile->read(data, hdr->size);
 	assert(len == hdr->size);
 
 	return new Common::MemoryReadStream(data, hdr->size, DisposeAfterUse::YES);
diff --git a/engines/ngi/ngiarchive.h b/engines/ngi/ngiarchive.h
index 50281fd3aa7..60312f0588f 100644
--- a/engines/ngi/ngiarchive.h
+++ b/engines/ngi/ngiarchive.h
@@ -22,12 +22,13 @@
 #ifndef NGI_NGIARCHIVE_H
 #define NGI_NGIARCHIVE_H
 
-#include "common/path.h"
-#include "common/ptr.h"
+#include "common/archive.h"
 
-namespace NGI {
+namespace Common {
+class File;
+}
 
-class Archive;
+namespace NGI {
 
 #define NGI_FILENAME_MAX 13
 
@@ -43,7 +44,7 @@ typedef Common::HashMap<Common::Path, Common::ScopedPtr<NgiHeader>, Common::Path
 
 class NGIArchive : public Common::Archive {
 	NgiHeadersMap _headers;
-	Common::Path _ngiFilename;
+	Common::File *_ngiFile;
 
 public:
 	NGIArchive(const Common::Path &name);


Commit: 8a84bb31dffb01b67a17c565bcca8d9dabda4fd4
    https://github.com/scummvm/scummvm/commit/8a84bb31dffb01b67a17c565bcca8d9dabda4fd4
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+01:00

Commit Message:
DLC: Fix build

Changed paths:
    backends/dlc/scummvmcloud.h


diff --git a/backends/dlc/scummvmcloud.h b/backends/dlc/scummvmcloud.h
index 6663a46c3aa..6a123680900 100644
--- a/backends/dlc/scummvmcloud.h
+++ b/backends/dlc/scummvmcloud.h
@@ -22,6 +22,7 @@
 #ifndef BACKENDS_DLC_SCUMMVMCLOUD_H
 #define BACKENDS_DLC_SCUMMVMCLOUD_H
 
+#include "common/error.h"
 #include "common/queue.h"
 
 #include "backends/dlc/store.h"


Commit: d18d0fd9446325de96a17af2e1bc72f0c832e95c
    https://github.com/scummvm/scummvm/commit/d18d0fd9446325de96a17af2e1bc72f0c832e95c
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+01:00

Commit Message:
TETRAEDGE: Don't declare OpenGL with shaders as supported

And don't try to fallback on classic OpenGL as it's not always
available.
This avoids the engine to error out on Android.
Instead, the getBestMatchingType falls back on TinyGL.

Changed paths:
    engines/tetraedge/tetraedge.cpp


diff --git a/engines/tetraedge/tetraedge.cpp b/engines/tetraedge/tetraedge.cpp
index 8545cc69457..a56fe3c666f 100644
--- a/engines/tetraedge/tetraedge.cpp
+++ b/engines/tetraedge/tetraedge.cpp
@@ -327,18 +327,12 @@ Graphics::RendererType TetraedgeEngine::preferredRendererType() const {
 #if defined(USE_OPENGL_GAME)
 			Graphics::kRendererTypeOpenGL |
 #endif
-#if defined(USE_OPENGL_SHADERS)
-			Graphics::kRendererTypeOpenGLShaders |
-#endif
 #if defined(USE_TINYGL)
 			Graphics::kRendererTypeTinyGL |
 #endif
 			0;
 
 	Graphics::RendererType matchingRendererType = Graphics::Renderer::getBestMatchingType(desiredRendererType, availableRendererTypes);
-	// Currently no difference between shaders and otherwise for this engine.
-	if (matchingRendererType == Graphics::kRendererTypeOpenGLShaders)
-		matchingRendererType = Graphics::kRendererTypeOpenGL;
 
 	if (matchingRendererType == 0) {
 		error("No supported renderer available.");


Commit: d1b0ced726cbc6feeb7d2d5a399971d15c1fa86d
    https://github.com/scummvm/scummvm/commit/d1b0ced726cbc6feeb7d2d5a399971d15c1fa86d
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-02-03T12:40:01+01:00

Commit Message:
CONFIGURE: Avoid using the Gold linker on non-mainstream archs, unless using --enable-gold

Debian, Fedora and Slackware have been building their official ScummVM
packages with --disable-gold for a while, because of build failures on
(at least) i386:

https://salsa.debian.org/games-team/scummvm/-/commit/a6afd58cf8cb8bb39ee1b1fd764ff1721b1001f4
https://src.fedoraproject.org/rpms/scummvm/c/e737fe0c41f2c9cff8400defaab10908b553db18?branch=rawhide
https://git.slackbuilds.org/slackbuilds/commit/games/scummvm?id=d3ce31e0215d7d6fdf7bdecac1bad499a0e0167d

I saw a similar issue on Linux ppc32 myself (linker internal error when
doing a full `-Og -g` build with all engines), and both Gentoo and Fedora
treat Gold as a deprecated linker nowadays, anyway.

Alternative linkers exist (mold, lld...), and ld.bfd often is a safe
default (and AFAICS it's not as slow at it used to be).

People really wanting to use Gold on other archs can still ask for it
with --enable-gold.

Out of simplicity, this patch doesn't handle the case where Gold would
be the default OS linker. We hope no system is doing that, if its linker
is known to have this kind of issues.

Changed paths:
    configure


diff --git a/configure b/configure
index b0e0fbce084..e29cc0d19dc 100755
--- a/configure
+++ b/configure
@@ -206,7 +206,7 @@ _pandoc=no
 _curl=yes
 _lld=no
 _mold=no
-_gold=yes
+_gold=auto
 # Default vkeybd/eventrec options
 _vkeybd=no
 _eventrec=no
@@ -2507,6 +2507,19 @@ else
 	define_in_config_if_yes yes 'NO_CXX11_ALIGNAS'
 fi
 
+# The Gold linker had known issues on at least i386 and ppc32, in some cases.
+# Since this linker is not very maintained anymore, and since alternatives exist,
+# avoid using it on non-mainstream archs, unless --enable-gold was explicitly given.
+if test "$_gold" = auto; then
+	case $_host_cpu in
+		aarch64 | x86_64 | amd64)
+			;;
+		*)
+			_gold=no
+			;;
+	esac
+fi
+
 #
 # Determine extra build flags for debug and/or release builds
 #
@@ -2542,7 +2555,7 @@ if test "$_debug_build" != no; then
 			append_var LDFLAGS "-fuse-ld=mold"
 			append_var LDFLAGS "-Wl,--gdb-index"
 			echo_n -- " + Mold"
-		elif test "$_gold" = yes && cc_check_no_clean $debug_mode -gsplit-dwarf -fuse-ld=gold -Wl,--gdb-index; then
+		elif test "$_gold" != no && cc_check_no_clean $debug_mode -gsplit-dwarf -fuse-ld=gold -Wl,--gdb-index; then
 			append_var LDFLAGS "-fuse-ld=gold"
 			append_var LDFLAGS "-Wl,--gdb-index"
 			echo_n -- " + Gold"


Commit: 109d593f48940bb3a156f6c44729930b41441533
    https://github.com/scummvm/scummvm/commit/109d593f48940bb3a156f6c44729930b41441533
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+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 e29cc0d19dc..fe476ac84b1 100755
--- a/configure
+++ b/configure
@@ -7067,8 +7067,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
@@ -7081,8 +7081,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
@@ -7102,9 +7102,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: adcdfa9c80a91f612a74bc1e7d6a8d14ac7fccdb
    https://github.com/scummvm/scummvm/commit/adcdfa9c80a91f612a74bc1e7d6a8d14ac7fccdb
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+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 fe476ac84b1..cb30852024e 100755
--- a/configure
+++ b/configure
@@ -7102,9 +7102,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: de6afa17e3226f1d09d1be8875736ac176d57c47
    https://github.com/scummvm/scummvm/commit/de6afa17e3226f1d09d1be8875736ac176d57c47
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-03T12:40:01+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 cb30852024e..9e495d6bfdb 100755
--- a/configure
+++ b/configure
@@ -2850,12 +2850,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