Skip to content

video: don't use NEON blitters when SDL_HasNEON returns false#15517

Open
madebr wants to merge 1 commit intolibsdl-org:mainfrom
madebr:only-eon-when-SDL_HasNEON-allows-it
Open

video: don't use NEON blitters when SDL_HasNEON returns false#15517
madebr wants to merge 1 commit intolibsdl-org:mainfrom
madebr:only-eon-when-SDL_HasNEON-allows-it

Conversation

@madebr
Copy link
Copy Markdown
Contributor

@madebr madebr commented May 5, 2026

  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

Existing Issue(s)

@icculus
Copy link
Copy Markdown
Collaborator

icculus commented May 5, 2026

Does this only need the SDL_NEON_INTRINSICS check and not all the arm8 etc stuff? Those extra checks are generally "we know this target always supports NEON," but we're changing this to check at runtime, so they probably need to go.

@madebr
Copy link
Copy Markdown
Contributor Author

madebr commented May 5, 2026

Does this only need the SDL_NEON_INTRINSICS check and not all the arm8 etc stuff? Those extra checks are generally "we know this target always supports NEON," but we're changing this to check at runtime, so they probably need to go.

I think so. The SDL_NEON_INTRINSICS macro is also used as guard in other locations.
But an actual arm user should verify this change.

@madebr
Copy link
Copy Markdown
Contributor Author

madebr commented May 5, 2026

I suppose the build failure answers your question :).
The blitters use 128-bit neon which apparently is arm8+.

@madebr madebr force-pushed the only-eon-when-SDL_HasNEON-allows-it branch from 70ebb2e to ac3fb35 Compare May 5, 2026 19:47
@ccawley2011
Copy link
Copy Markdown
Contributor

The __ARM_ARCH >= 8 check can be removed, since that should already be implied on AArch64.

@cgutman
Copy link
Copy Markdown
Collaborator

cgutman commented May 6, 2026

What's the motivation for this change? All of the platforms that pass the ifdef (ARMv8) should be guaranteed to have NEON.

@madebr
Copy link
Copy Markdown
Contributor Author

madebr commented May 6, 2026

SDL3 has a hint that allows disabling simd features at runtime: SDL_HINT_CPU_FEATURE_MASK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants