Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix detection of SSE2 with Visual Studio #13

Merged
merged 1 commit into from
May 7, 2020

Conversation

akien-mga
Copy link
Contributor

The previous code assumed that SSE2 is available when building with
Visual Studio, but that's not accurate on ARM with UWP.

SSE2 could also be enabled on x86 if _M_IX86_FP == 2, but it requires
checking first that it's not actually set to 2 for AVX, AVX2 or AVX512
(see https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019),
so I left it out for this quick fix.

The previous code assumed that SSE2 is available when building with
Visual Studio, but that's not accurate on ARM with UWP.

SSE2 could also be enabled on x86 if `_M_IX86_FP == 2`, but it requires
checking first that it's not actually set to 2 for AVX, AVX2 or AVX512
(see https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019),
so I left it out for this quick fix.
akien-mga added a commit to akien-mga/godot that referenced this pull request May 7, 2020
The previous code would always use SSE2 intrinsics, which is not valid
on UWP ARM platforms (and likely not on some x86 platforms either).

The patch has been submitted upstream too:
richgel999/jpeg-compressor#13
akien-mga added a commit to godotengine/godot that referenced this pull request May 7, 2020
The previous code would always use SSE2 intrinsics, which is not valid
on UWP ARM platforms (and likely not on some x86 platforms either).

The patch has been submitted upstream too:
richgel999/jpeg-compressor#13

(cherry picked from commit 3806efb)
@richgel999 richgel999 merged commit ec81d71 into richgel999:master May 7, 2020
@richgel999
Copy link
Owner

Got it - Thanks a lot!

@akien-mga akien-mga deleted the fix-msvc-sse2-detection branch May 7, 2020 21:54
edg1000 pushed a commit to edg1000/https-github.com-godotengine-godot that referenced this pull request Apr 23, 2024
The previous code would always use SSE2 intrinsics, which is not valid
on UWP ARM platforms (and likely not on some x86 platforms either).

The patch has been submitted upstream too:
richgel999/jpeg-compressor#13
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.

None yet

2 participants