Commit Graph

4503 Commits

Author SHA1 Message Date
Gabriel Wang
f2dba2626e SVE2: Improves SVE2 8888 swizzling performance and important fixes (#15662)
* SVE2 was actually disabled in fdfbbce, this issue is fixed
  - The macro __ARM_FEATURE_SVE  is only defined when the compilation target is set as -march=armv8-m+sve2
* Improves 8888 alpha-blending performance
  - Now, in In-Order AArch64 processors, e.g. A520, SVE2 is better than NEON with the 128bit vector width
  - For Out-of-order processors, NEON is still better than SVE2 (We could improve this in the future), the performance is improved from 3.0 to 3.6.
* The 8888 -> RGB565 performance is also improved (from 7.4 to 9.3)
2026-05-26 07:57:44 -07:00
SDL Wiki Bot
d5438360d2 Sync SDL3 wiki -> header
[ci skip]
2026-05-26 13:58:48 +00:00
Ryan C. Gordon
d0f6264f95 docs: Update notes on SDL_AudioStream format management.
Fixes #15688.
2026-05-26 09:57:06 -04:00
Sylvain Becker
d4236dcd85 opengles: Readd an OpenGL ES 1 renderer to SDL3! (#15185)
This readds the "opengles" renderer, updated from SDL2 to work on SDL3.

Fixes #15661.

Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>
2026-05-25 20:41:13 -04:00
SDL Wiki Bot
259207eb23 Sync SDL3 wiki -> header
[ci skip]
2026-05-25 18:05:03 +00:00
Anonymous Maarten
08e338f45c _uitoa does not exist 2026-05-25 17:26:09 +02:00
Anonymous Maarten
55388abb34 Revert "SDL_itoa(): use _itoa_s(), not _ltoa_s()"
This reverts commit ae07e32269.
This reverts commit 33c9f1a70a.
2026-05-25 17:26:09 +02:00
Anonymous Maarten
33c9f1a70a Fix -Wdeprecated-declarations warnings
An alternative could be to define _CRT_SECURE_NO_WARNINGS
2026-05-21 22:50:32 +02:00
Ryan C. Gordon
9a56bc66b5 assert: fixed compiler warning with LLVM + x86_64-pc-windows-msvc target.
Fixes #15578.
2026-05-20 13:02:41 -04:00
Sam Lantinga
33e237eb67 visionos: persist all configurable window settings
Save the gaze indicator and dimmed mode setting as well as curvature
2026-05-17 11:35:30 -07:00
Cameron Gutman
6d3404e4bb gamepad: Add SDL_GAMEPAD_TYPE_STEAM for Steam Controllers 2026-05-17 11:19:16 -07:00
SDL Wiki Bot
31d6acef64 Sync SDL3 wiki -> header
[ci skip]
2026-05-17 15:51:20 +00:00
Sam Lantinga
63d2635719 Added SDL_HINT_AUDIO_DUCK_OTHERS
Previously default audio on Apple platforms would duck other audio streams. This is unexpected, so by default we won't do that and you can use the hint SDL_HINT_AUDIO_DUCK_OTHERS to re-enable that behavior.
2026-05-17 08:47:36 -07:00
ceski
5b98c1cc2f Add capacitive sense gamepad events (#15627) 2026-05-17 08:26:29 -07:00
Ozkan Sezer
968b0c6910 update gl/egl headers from khronos. 2026-05-17 16:29:03 +03:00
Ozkan Sezer
75c94e9b31 SDL_opengl_glext.h, src/video/directx/d3d12.h: revert unintended changes from commit d70578b9aa 2026-05-17 16:28:29 +03:00
Ozkan Sezer
d4fa4b4634 SDL_opengles2_khrplatform.h: add cygwin bit missed in commit 2cd5cd2a. 2026-05-17 11:50:10 +03:00
Ozkan Sezer
2cd5cd2a42 cygwin: patch egl/opengles headers for EGLAPIENTRY 2026-05-17 09:55:31 +03:00
Anonymous Maarten
71979477c7 include: add sve2 to documentation of SDL_HINT_CPU_FEATURE_MASK 2026-05-17 04:41:56 +02:00
Ozkan Sezer
774506c2b7 SDL_opengl.h: clean-up SDL's cygwin customization. 2026-05-16 09:24:33 +03:00
stahta01
6586bebfec Fix Cygwin building and add CI (#15566)
Co-authored-by: TrueCat17 <truecat17@gmail.com>
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
2026-05-15 08:48:24 -07:00
SDL Wiki Bot
ff98125cbd Sync SDL3 wiki -> header
[ci skip]
2026-05-15 00:43:30 +00:00
Petar Popovic
8787895575 SDL_video.h comment update 2026-05-14 17:42:02 -07:00
Sam Lantinga
fdfbbcefb2 Fixed error: "SVE support not enabled" building on Android 2026-05-14 12:01:19 -07:00
SDL Wiki Bot
9e07e0c215 Sync SDL3 wiki -> header
[ci skip]
2026-05-14 18:52:22 +00:00
crudelios
439ffd13eb Android: Add support for folder dialogs 2026-05-14 11:50:52 -07:00
Sam Lantinga
de08751537 Fixed build for older toolchains that don't have arm_sve.h 2026-05-14 11:42:54 -07:00
Sylvain Becker
11745aad07 Fix build with SVE2 (#15586) 2026-05-14 11:17:53 -07:00
Anonymous Maarten
2fa7ba1e4f stdinc: _Countof is only available in C mode 2026-05-14 18:42:46 +02:00
SDL Wiki Bot
a400a70484 Sync SDL3 wiki -> header
[ci skip]
2026-05-14 06:39:08 +00:00
Gabriel Wang
0f175891a6 Add SVE2 SIMD Alpha-Blending Blitter (#15504)
SVE/SVE2 is a new SIMD extension for AArch64. Compared to NEON, SVE/SVE2 brings the following benefits that are good for SDL projects:

- Lane prediction: we don't have to treat the tail part of a stride separately when the width is n times the hardware vector size
- Although the performance is almost no difference from NEON when the hardware vector size is 128bits, when the hardware provides a longer vector size, e.g. 256, 512, ... 2048, we can enjoy the large performance gain without modifying the source code or recompiling a library.

The functional correctness is validated in a dedicated [qemu project](https://github.com/GorgonMeducer/aarch64_qemu_mac_template/tree/SDL-SVE2-Acceleration-Validation).

The performance is tested on [Radxa Orion 6 N](https://radxa.com/products/orion/o6n/), which provides 4x A720 and 4x A520 processors. Since the vector size is 128 bits, which is the same as NEON, the performance is almost the same (or no worse than) the NEON acceleration.
2026-05-13 23:37:46 -07:00
Cameron Cawley
e50faf4e6a Support the full set of standard CSS cursors 2026-05-13 20:24:44 -07:00
Cameron Cawley
c6b232f5d4 Support loading JPEG images through SDL_LoadSurface() 2026-05-13 16:11:53 -07:00
Sam Lantinga
716c767b7e Document that you may receive mouse events with SDL_PEN_MOUSEID 2026-05-13 08:11:41 -07:00
SDL Wiki Bot
fd8682ccc9 Sync SDL3 wiki -> header
[ci skip]
2026-05-12 23:49:34 +00:00
Sam Lantinga
5cf16e4522 Added curved window mode on visionOS 26 (#15298) 2026-05-12 16:48:06 -07:00
Al. Lopez
4940345a2e added additional examples of paddle/misc buttons for Steam Controller (#15544) 2026-05-11 21:45:10 -07:00
SDL Wiki Bot
c7df6fe847 Sync SDL3 wiki -> header
[ci skip]
2026-05-05 17:47:49 +00:00
Frank Praznik
b8545fce54 x11: Disable the X Synchronization Extension by default
Under the right conditions, this extension can result is smoother resizing when rendering with OpenGL, however, it is known to cause problems in certain cases, such as when handling presentation externally.

Gate it behind a hint, and disable it by default. Developers can selectively enable it when they verify that they meet the criteria for using it, and that it behaves correctly in their apps/games.
2026-05-05 13:46:21 -04:00
Anonymous Maarten
f0b89704e9 stdinc: use _Countof in SDL_arraysize
_Countof is a compiler intrinsics that errors when using a pointer argument
2026-05-01 07:20:29 -04:00
SDL Wiki Bot
b40baf1532 Sync SDL3 wiki -> header
[ci skip]
2026-04-28 19:11:35 +00:00
Ryan C. Gordon
788bd816e7 SDL_openxr.h: Another attempt to fix the wiki bridge. 2026-04-27 14:54:22 -04:00
SDL Wiki Bot
364c8037f4 Sync SDL3 wiki -> header
[ci skip]
2026-04-27 18:46:49 +00:00
Ryan C. Gordon
96a061e1b1 SDL_openxr.h: Wrap some non-SDL pieces in !SDL_WIKI_DOCUMENTATION_SECTION. 2026-04-27 14:42:10 -04:00
Ryan C. Gordon
6d9b470e84 SDL_openxr.h: tweak the category docs language slightly. 2026-04-27 14:41:45 -04:00
SDL Wiki Bot
30aeb330f2 Sync SDL3 wiki -> header
[ci skip]
2026-04-27 18:38:02 +00:00
Cameron Gutman
66e98b5598 atomic: Fix infinite recursion in SDL_CompilerBarrier() fallback
On some platforms, SDL_MemoryBarrierRelease() is defined to
SDL_CompilerBarrier(). If SDL_CompilerBarrier() is also defined to
the fallback spinlock acquire/release, then we will infinitely
recurse in SDL_UnlockSpinlock(). Avoid this by not unlocking the
temporary spinlock we create.
2026-04-27 14:30:18 -04:00
Cameron Gutman
d5acd7f123 atomic: Use __atomic_signal_fence() for SDL_CompilerBarrier()
This is the (slightly) more standard way to accomplish it.
2026-04-26 22:03:34 -05:00
Frank Praznik
80a5905075 wayland: Change the non-native fullscreen mode scaling default to 'aspect' 2026-04-26 11:54:31 -04:00
Cameron Gutman
2c4c8172d7 atomic: Fix memory barriers on MSVC ARM64 2026-04-24 20:12:26 -05:00