Commit graph

66 commits

Author SHA1 Message Date
Sam Lantinga
6b6170caf6 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Ben Avison
fd7508ad61 ARM: Create configure option --enable-arm-simd to govern assembly optimizations
--HG--
extra : histedit_source : 12ab7dd2b55b3aea44b60ad153a73bd41d81f3fb
2019-10-24 21:12:08 -04:00
Sam Lantinga
9a01434255 [ SDL ] Fix compile error building for Windows/ARM64 on Visual Studio 2017 Win10 SDK 10.0.18362.0 which requires ar,74intr.h/arm64_neon.h header instead of armintr.h/arm_neon.h for intrinsics.
@saml
2019-08-08 13:26:05 -07:00
Ozkan Sezer
01ec6cbd48 define __ARM_NEON for Windows only if _M_ARM or _M_ARM64 is defined. fixes Visual Studio builds. 2019-06-25 11:47:02 +03:00
Sam Lantinga
37e8ee2808 Fixed bug 4557 - SDL_SIMDAlloc and *Free should be in the public interface
Martin Gerhardy

These functions are really useful and should get exposed imo.
2019-06-08 14:54:37 -07:00
Sam Lantinga
ec88d33573 Don't redefine __SSE__ and related macros if they're already defined 2019-04-23 16:57:34 -07:00
Sam Lantinga
af32a2f4cd Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sylvain Becker
909d54aadd Fix comment and end of lines 2018-12-04 18:15:45 +01:00
Sylvain Becker
ee4db39e2d Windows: NEON detection and intrinsic includes on Visual Studio
Visual Studio doesn't define __ARM_ARCH nor _ARM_NEON, but _M_ARM and _M_ARM64,
so SDL_HasNEON() was bypassed.

PF_ARM_NEON_INSTRUCTIONS_AVAILABLE doesn't see to be defined (but still works
 when defined as 19).
2018-12-04 16:50:31 +01:00
Sylvain Becker
feadefd971 android: use __ARM_NEON instead of __ARM_NEON__ to include <arm_neon.h>
Only __ARM_NEON is defined with Android NDK and arm64-v8a
Tested on ndk-r18, ndk-r13 and also Xcode.
(Visual Studio needs a different fix).

Fixes Bugzilla #4409.
2018-12-04 12:34:45 +01:00
Sam Lantinga
3a25554bb0 Fixed bug 4392 - SDL_cpuinfo.h breaks compilation with C bool type
Luke Dashjr

Bug 3993 was "fixed" by #undef'ing bool. But this breaks C99's stdbool.h bool too.

For example, mpv's build fails with:

../audio/out/ao_sdl.c:35:5: error: unknown type name ‘bool’

It seems ill-advised to be #undef'ing *anything* here - what if the code including SDL_cpuinfo.h actually wants to use altivec?
2018-11-19 21:28:52 -08:00
Ryan C. Gordon
72aa5ee14c audio: Added ARM NEON versions of audio converters.
These are _much_ faster than the scalar equivalents on the Raspberry Pi that
I tested on. Often 3x to 4x as fast!

--HG--
extra : rebase_source : a9f90ef5bfdd309d6a3c8e9220ee235d7413cb5d
extra : histedit_source : 61c5ad731eed96f7bb46da40261ed8b14d474624
2018-05-16 02:03:06 -04:00
Ryan C. Gordon
b7560b9599 cpuinfo: Added SDL_HasAVX512F().
This checks for the "foundation" AVX-512 instructions (that all AVX-512
compatible CPUs support).

--HG--
extra : rebase_source : 2857dd04072e2f897e18665d0a4fe2837c06ed9b
extra : histedit_source : 67d0b925bceb2ed2a8f37b5783f2b755e796031f
2018-05-21 11:35:42 -04:00
Ryan C. Gordon
fbfce09170 cpuinfo: Added some internal SIMD-aligned allocation functions.
Fixes Bugzilla #4150 (sort of).

--HG--
extra : rebase_source : af4df4fe459ce28889fb225717c418e6c1ef9ae4
extra : histedit_source : aafd7e609c08ea908255e205d23e3efdc88837a1
2018-05-21 11:34:57 -04:00
Sam Lantinga
b9ad34197f Fixed bug 4103 - SDL_cpuinfo.h provokes warnings with -Wundef on non-x86 hosts
Felix Geyer

Forwarding from https://bugs.debian.org/892087 quoting verbatim:

The SDL2 header SDL_cpuinfo.h generates gcc warnings if the program using
it compiles with the -Wundef warning. (In particular, this means that QEMU
builds using it fail on at least sparc hosts, since QEMU dev builds
use both -Wundef and -Werror.).

/usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is not defined, evaluates to 0 [-Wundef]
 #if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
2018-03-10 21:20:25 -08:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
308b7a6719 Fixed bug 3993 - altivec.h include in SDL_cpuinfo.h breaks compilation with -std=c++11
bastien.bouclet

According to this GCC bug report, altivec.h requires building with the gnu extensions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78263.

As an application developer, I don't want SDL to force me to enable the gnu extensions.
2017-12-12 16:25:43 -08:00
Sam Lantinga
aef30f74b7 Check for immintrin.h before using it in SDL_cpuinfo.h 2017-12-11 12:00:12 -08:00
Sam Lantinga
5d91301861 Only include Intel intrinsics header on x86 and x64 2017-11-11 16:20:00 -08:00
Sam Lantinga
2f2d79f342 Replaced the intrinsics header with the single header that includes all intrinsics so we can use AVX, etc. 2017-11-10 14:22:21 -08:00
Sam Lantinga
e9ee7f6f0d Fixed building SDL applications with Visual Studio and the clang toolset
Also fixed building 64-bit SDL with clang. 32-bit doesn't build because of the inline assembly for C runtime support.
2017-08-19 03:07:44 -07:00
Ryan C. Gordon
6e1edca849 audio: Wired up new SSE code to build system.
--HG--
extra : rebase_source : 3c94cdc92b94864eb43d7429032724227b798cf2
2017-01-23 01:05:44 -05:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
91e0a1d094 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Ryan C. Gordon
79c41b1692 cpuinfo: first attempt at SDL_HasNEON() implementation. 2016-11-17 01:15:16 -05:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Sam Lantinga
4d8562f23f Fixed bug in AVX detection and added AVX2 detection 2014-07-11 22:02:50 -07:00
Sam Lantinga
a7d2ebb8d6 Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Sam Lantinga
420a70436c Fixed bug 2376 - no SDL_HasAVX
Haneef Mubarak

AVX is the successor to SSE* and is fairly widely available. As such, it really ought to be detectable.

This functionality ought to be trivial to implement, and not having it means being forced to write an ugly workaround to check for AVX (so that normal SSE can be used if AVX is not available).

Here is an example on detecting AVX from SO (it actually shows ways to cehck for all of teh fancy instructions):

http://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set
2014-02-02 00:33:31 -08:00
David Ludwig
59df93166d WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
Sam Lantinga
a04ca13c2d Added an API to get the amount of system RAM 2013-10-17 11:32:56 -07:00
David Ludwig
88461d442a WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
David Ludwig
776ebe3bda WinRT: merged with latest, official, SDL 2.x code 2013-02-23 20:01:46 -05:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
David Ludwig
b513e6f8f0 WinRT: made SDL.dll compile for ARM (and not just x86 or x64) 2012-10-27 18:39:09 -04:00
Ryan C. Gordon
5c732d6324 Removed Windows CE support from SDL 2.0.
It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.

If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.
2012-09-15 10:59:39 -04:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
a17d0eb586 The MMX and 3DNow! instructions can't be compiled by 64-bit Visual Studio. 2011-03-07 22:04:10 -08:00
Sam Lantinga
e32b25be9e Fixed compiling AltiVec blitters 2011-02-27 22:22:58 -08:00
Sam Lantinga
d79f7ed02d Fixed altivec.h include on Mac OS X 2011-02-22 22:17:44 -08:00
Sam Lantinga
e4a0db291e Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
8ecd7110d2 Fixed SSE4 detection, and split it into SSE 4.1 and 4.2 2011-02-11 23:02:35 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
0314fd4e0f Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
b2ff9dc39f Added API function to get CPU cache line size. 2011-01-27 20:46:45 -08:00
Sam Lantinga
772009b691 Bump up the default cache line size. 2011-01-27 16:51:47 -08:00