Commit Graph

36 Commits (fc4296c114640479b6862c03da73d26599c8e1a1)

Author SHA1 Message Date
Sam Lantinga 609cea1eb8 Enable SSE3 intrinsics when building with Visual Studio
Fixes https://github.com/libsdl-org/SDL/issues/4530
2021-08-10 17:14:06 -07:00
Ryan C. Gordon c88eb7a896
Sync wiki -> header. 2021-07-14 17:07:04 -04:00
Ryan C. Gordon f8c1fc49d9
doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
Vladislav Dmitrievich Turbanov 50db4a59b8 * Support for intrinsics in MSW + Clang scenario.
Utility polyfill is provided, removed the no-longer-needed
conditionals.
2021-04-09 22:28:07 -07:00
Ryan C. Gordon 3f40396d33
First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
Esme 8ba735c208 Include arm_neon.h in mingw targeting ARM Windows.
The llvm-mingw project includes cross-compilers targeting ARM: https://github.com/mstorsjo/llvm-mingw/releases

Currently, compilation fails with this configuration, because neon features are used as long as __ARM_NEON is defined, but arm_neon.h was not included.
2021-03-15 10:11:51 +03:00
Sam Lantinga 9130f7c377 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
Ozkan Sezer fc795f89d3 SDL_cpuinfo.h: add missing const to size parameter of SDL_SIMDRealloc()
so that the declaration matches the definition.
2020-10-13 05:20:00 +03:00
Ethan Lee 2aa8974f97 Add SDL_SIMDRealloc 2020-06-11 12:03:33 -04:00
Sam Lantinga a8780c6a28 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Ben Avison 6a6a05289e ARM: Create configure option --enable-arm-simd to govern assembly optimizations 2019-10-24 21:12:08 -04:00
Sam Lantinga cbdee4d656 [ 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 282b2b9395 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 8728ce4448 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 53a6196b32 Don't redefine __SSE__ and related macros if they're already defined 2019-04-23 16:57:34 -07:00
Sam Lantinga 5e13087b0f Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sylvain Becker 69c256c102 Fix comment and end of lines 2018-12-04 18:15:45 +01:00
Sylvain Becker 09b462044f 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 aea7e56a24 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 ac15de18bd 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 b7e88aaae0 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!
2018-05-16 02:03:06 -04:00
Ryan C. Gordon 4df859c586 cpuinfo: Added SDL_HasAVX512F().
This checks for the "foundation" AVX-512 instructions (that all AVX-512
compatible CPUs support).
2018-05-21 11:35:42 -04:00
Ryan C. Gordon 8543ad7df1 cpuinfo: Added some internal SIMD-aligned allocation functions.
Fixes Bugzilla #4150 (sort of).
2018-05-21 11:34:57 -04:00
Sam Lantinga 6d39e67bad 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 e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga 0597bf6e99 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 f1ec8a5f4c Check for immintrin.h before using it in SDL_cpuinfo.h 2017-12-11 12:00:12 -08:00
Sam Lantinga 846d008036 Only include Intel intrinsics header on x86 and x64 2017-11-11 16:20:00 -08:00
Sam Lantinga 4026db8c7e 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 30d554e3d6 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 3594bf8eeb audio: Wired up new SSE code to build system. 2017-01-23 01:05:44 -05:00
Sam Lantinga 45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga 3615633571 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 35430a73f2 cpuinfo: first attempt at SDL_HasNEON() implementation. 2016-11-17 01:15:16 -05:00
Sam Lantinga 42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00