-
-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Issue №2227 opened by illume at 2020-10-22 09:48:55
Need to figure out how to build this with runtime detection.
Otherwise using SSE2 could be an option.
Comments
# # nthykier commented at 2021-10-17 08:08:40
Had a look at this and as I understand it, the root issue is that we unconditionally passed -msse4.2
to the compiler - allegedly to appease some ancient version of CentOS per # 1905 (pygame/pygame@8894fb2). The # ifdef
s were not the issue.
I propose that we bump the gcc
version requirements to perform the SSE4.2 build so it excludes the old CentOS compiler but happens with more modern versions.
@illume: Do you remember the version of gcc used or the CentOS version?
# # nthykier commented at 2021-10-17 08:23:25
MIght need a bit of # pragma
massage before including the instrintics.
https://stackoverflow.com/questions/46165752/does-clang-have-something-like-pragma-gcc-target
# # robertpfeiffer commented at 2021-10-18 15:42:12
MIght need a bit of
# pragma
massage before including the instrintics.https://stackoverflow.com/questions/46165752/does-clang-have-something-like-pragma-gcc-target
Last time I checked, this does not work with MSVC. As far as I can tell, there is no simple way to do this that works in GCC, clang, and MSVC, and that works for ARM and X86 without additional ifdefs.
# # illume commented at 2022-01-26 00:38:49
We've dropped support for SDL1 and older manylinux since this issue was started. So now maybe it will work.
A couple of years ago it was 97%, now SSE 4.2 is at 98.53% on the steam survey. https://store.steampowered.com/hwsurvey Also, it does seem more things require SSE 4.2 now compared to 2020, so probably we can just enable it by default without much damage. For example dosbox requires it since 2021.
I think we can just enable SSE 4.2, and be able to use the nice image.tostring function that @nthykier wrote, and possibly allow @MyreMylar to use SSE 4.2 in blitters.
SSE 4.2 could do 4 pixels at once? Similar to pygame/pygame#1715 ? https://en.wikipedia.org/wiki/SSE4# SSE4.2
"several new instructions that perform character searches and comparison on two operands of 16 bytes at a time."