Enable Windows ARM64 & ARM64EC in "stb_image.h" and "stb_image_resize2.h" and fix build failures. #1918
Open
navvyswethgraphics wants to merge 3 commits into
Open
Conversation
Contributor
|
I'll check this the resize stuff in the next couple weeks! |
Exclude _M_ARM64EC from x64 target detection to avoid incorrect SIMD paths under MSVC. Remove generic ARM64 detection and stop auto-enabling NEON. NEON is now enabled only when explicitly requested via STBI_NEON. OA# Your branch is up to date with 'origin/support_arm64_arm64ec_msvc'.
Author
Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds proper detection and support for Windows ARM64 and ARM64EC:
Background
On MSVC ARM64EC, building could pull in x86 headers (<emmintrin.h>) and fail with:
error C1189: #error: this header should only be included through <intrin.h>
This came from incorrect architecture gating that didn’t exclude ARM64EC from x86/SSE paths.
Fix
Architecture selection updated to detect _M_ARM64EC.
ARM64/ARM64EC: include <intrin.h> and <arm64_neon.h> when NEON is enabled.
Ensure STBI_NO_SIMD disables NEON as intended.
In "stb_image_resize2.h" add NEON support for ARM64EC code paths.
Build & Test
Environment: Windows 11 on ARM64; MSVC (VS 2022 v143 toolset).
Result: ARM64 and ARM64EC configurations compile cleanly; x86/x64 unchanged.