Commit Graph

20395 Commits

Author SHA1 Message Date
Sam Lantinga f3815ede24 Rebuilt GPU renderer shaders 2025-10-03 19:35:45 -07:00
eafton c2429e85ec X11TK: Add Arabic/Hebrew/Farsi support by increasing font size slightly and using FriBidi. (#14134) 2025-10-03 19:08:24 -07:00
Sam Lantinga 49d51a0d3c Removed TEXTURETYPE_PALETTE_PIXELART
This doesn't make any sense since the pixel art algorithm uses a box filter to get an average pixel value which isn't possible with indexed textures.
2025-10-03 18:54:07 -07:00
Sam Lantinga ac2c834021 Fixed build 2025-10-03 16:04:45 -07:00
Sam Lantinga 1cda789a37 render: Default to primary display in SDL_CalculateSimulatedVSyncInterval if window is not set
- Fixes previous change to SDL_CreateRendererWithProperties which skipped SDL_CalculateSimulatedVSyncInterval if window was not set.
2025-10-03 16:00:44 -07:00
Sam Lantinga 0cab3521f1 render: Fix asserts from null window usage in SDL_CreateRendererWithProperties 2025-10-03 16:00:41 -07:00
Anonymous Maarten f4039d0132 release: don't cache ndk + verify arm64 alignment 2025-10-03 23:54:53 +02:00
Sam Lantinga 32668c4ddd Palettized textures will always use SDL_SCALEMODE_NEAREST.
Our algorithm for pixel art doesn't work on 8-bit images, needs further investigation.

Fixes https://github.com/libsdl-org/SDL/issues/14129
2025-10-03 14:29:47 -07:00
Sam Lantinga d333044462 Fixed destination coordinates when using scale with the software renderer
Fixes https://github.com/libsdl-org/SDL/issues/14051
2025-10-03 13:58:45 -07:00
Sam Lantinga b7b2e8bc31 Don't change the display of a window until it is mostly on the new one
Fixes https://github.com/libsdl-org/SDL/issues/12665
2025-10-03 12:38:47 -07:00
Sam Lantinga baae2a628d Store the current window display ID on the window 2025-10-03 12:38:47 -07:00
Anonymous Maarten 541dc6ba20 android: don't promote custom SDL3::SDL3 targets 2025-10-03 21:08:14 +02:00
Anonymous Maarten fe17e49116 ci: build testffmpeg on ubuntu and mac 2025-10-03 20:59:05 +02:00
Anonymous Maarten 0bbfbf5b37 cmake: use correct suffix in PkgConfigHelper 2025-10-03 20:58:45 +02:00
Anonymous Maarten 23646aed53 cmake: quietly look for SDL3-static and SDL3_test framework in SDL3Config.cmake 2025-10-03 19:14:40 +02:00
Nintorch 6e6dc500b5 Add blacklist words for gamepad names 2025-10-03 09:44:56 -07:00
nmlgc 8824eace93 testautomation: Test SDL_snprintf() for doubles >LLONG_MAX and <ULLONG_MAX
The uclibc version of SDL_snprintf() is currently limited to values
<ULLONG_MAX due to the `unsigned long long` cast in SDL_PrintFloat(),
but it makes sense to at least ensure that it does support the full
unsigned 64-bit range. This also covers the one defined case where a
32-bit MSVC build can't assume that _ftoul2_legacy() == _ftol2().
2025-10-03 07:21:20 -07:00
nmlgc f39e49a3dd SDL_mslibc: Implement _ftoul2_legacy()
cl.exe versions ≥v19.41 call this builtin for double → uint64_t
conversions on x86. SDL currently needs such conversions in:

* MainCallbackRateHintChanged()
* SDL_PrintFloat()
* WIN_ApplyWindowProgress()

This seems enough to justify implementing this function rather than
trying to work around it, as it was done in sdl12-compat:

	https://github.com/libsdl-org/sdl12-compat/issues/352

This implementation was taken from ReactOS:

	https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f637e6b809adb5e0ae420ef4f80c73b19172a2e7

Passes the stdlib testautomation, and also matches the behavior of
Microsoft's 64-bit libc for the currently implementation-defined case
of calling SDL_PrintFloat() with values >SDL_MAX_UINT64.
2025-10-03 07:21:20 -07:00
nmlgc 7916af9910 build: Fix typo in SDL_uclibc target name for 32-bit Windows 2025-10-03 07:21:20 -07:00
Ryan C. Gordon 0467c531fa wasapi: Check for a NULL device during disconnect handling.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This is probably something we already cleaned up that has something running
in an unexpected order now that we've moved disconnect work to the main thread.
2025-10-03 09:36:31 -04:00
mccakit f6e711c377 replace script with flags
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-10-02 15:46:58 -07:00
mccakit 2e4bc73916 static release build fix 2025-10-02 15:46:58 -07:00
mccakit fe92d0a7bd android symbol export for release builds 2025-10-02 15:46:58 -07:00
Sam Lantinga b1c2dd8433 Make sure the current resolution is in the fullscreen mode list
Custom resolutions don't enumerate normally, but make sure the current resolution is in the mode list.

Fixes https://github.com/libsdl-org/SDL/issues/11551
2025-10-02 15:19:41 -07:00
Sam Lantinga 11a66bd18c Minor cleanup in calls to getContext()
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-10-02 10:50:10 -07:00
SDL Wiki Bot ed6b6bb7fc Sync SDL3 wiki -> header
[ci skip]
2025-10-02 17:02:50 +00:00
Ryan C. Gordon 24b47814f8 emscripten: Another attempt at optionally having the canvas use whole window.
Fixes #11949.
2025-10-02 13:01:35 -04:00
SDL Wiki Bot 352246cbb0 Sync SDL3 wiki -> header
[ci skip]
2025-10-02 16:25:57 +00:00
Anonymous Maarten e66f7efa2f SDL_WINDOWPOS_* macros are to be used with SDL_[GS]etWindowPosition 2025-10-02 18:24:31 +02:00
Simon McVittie 618b7b6c73 build: Prefix SDL- to revision from REVISION.txt
This makes it possible to get the version number of an unknown SDL binary
from `strings libSDL3.so.0 | grep SDL-`, like we could for SDL 2.

Resolves: https://github.com/libsdl-org/SDL/issues/14114
Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-10-02 09:08:29 -07:00
Simon McVittie d5b79418f4 build: Prefix version from git with SDL- rather than SDL3-
We can tell it's SDL 3 from the version number and git revision,
so there's no need to duplicate that in the prefix.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-10-02 09:08:29 -07:00
Frank Praznik e5c28c5326 wayland: Fix variable scope 2025-10-02 12:02:57 -04:00
Sam Lantinga a864dcac25 Added support for using the GPU renderer as an offscreen renderer
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
SDL_CreateGPURenderer() now allows passing in an existing GPU device and passing in a NULL window to create an offscreen renderer.

Also renamed SDL_SetRenderGPUState() to SDL_SetGPURenderState().
2025-10-01 23:32:18 -07:00
Frank Praznik 9461db1ec8 Fix typo
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-10-01 19:21:10 -04:00
Frank Praznik 9182b8ab61 wayland: Add a fallback for xkb_keymap_key_get_syms_by_level() for old xkbcommon versions
This function is only available since version 1.0.0, but the SDL minimum is 0.5.0, and Steam Runtime 2 'soldier' uses 0.8.2, so add a fallback function with similar functionality for older versions.

xkb_keymap_key_get_mods_for_level() is more efficient, so it is still favored when available.
2025-10-01 17:59:07 -04:00
Sam Lantinga 8d7cd3c6c2 Fixed line endings
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-10-01 14:01:59 -07:00
Sam Lantinga 33c849d030 Always enable object validation when checking is explicitly enabled 2025-10-01 13:53:19 -07:00
Sam Lantinga f66e4d0a43 Enable full object validation by default
Full object validation was always done before this hint and there are a number of shipping products that relied on this, so don't change it by default.
2025-10-01 12:46:33 -07:00
Mathieu Eyraud 86da08b0be Zero-initialize SDL_GPUDevice 2025-10-01 07:22:17 -07:00
Mathieu Eyraud 409bb7722c Fix uninitialized variables 2025-10-01 07:21:44 -07:00
Sam Lantinga 9735c45db6 Added an advanced shader for the GPU renderer
This allows us to support YUV colorspaces and HDR in the GPU renderer.

Fixes https://github.com/libsdl-org/SDL/issues/11281
Fixes https://github.com/libsdl-org/SDL/issues/11282
2025-10-01 07:17:55 -07:00
Sam Lantinga fe3b399b7e Added support for P010 pixel format in SDL_UpdateNVTexture() 2025-10-01 07:17:55 -07:00
Sam Lantinga 548063e578 Fixed pixel shader for palettized textures using pixelart scaling 2025-10-01 07:17:55 -07:00
Sam Lantinga 224b4917a3 testpalette: added a --renderer command line option 2025-10-01 07:17:55 -07:00
Frank Praznik b54c5fd79c x11: Check for a valid input context before destroying it
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
XDestroyIC crashes if passed a null parameter.
2025-09-30 14:48:39 -04:00
Sam Lantinga 8a5f9a3837 Removed validate_feature_indirect_draw_first_instance_disabled (thanks @rabbit-ecl!)
It was incorrectly checking the direct draw functions instead of checking indirect draw buffers.
2025-09-30 11:36:29 -07:00
Anonymous Maarten fd4c2f8cfd ci: build testffmpeg on MinGW (msys2) build bots 2025-09-30 17:42:11 +02:00
eafton 76308181b9 Fix #14072 2025-09-30 08:41:23 -07:00
Simon McVittie c81b4e8493 test: Space-separate arguments in as-installed tests' .test files
The "as-installed" tests have metadata files in the .desktop-like format
used by gnome-desktop-testing, which uses a subset of shell syntax for
the Exec field. The list of arguments is represented as a
semicolon-separated list by CMake, but we need to convert that into a
space-separated list for the Exec field.

Strictly speaking we should be quoting the arguments with the equivalent
of Python's shlex.quote, but I couldn't find a way to do that in CMake,
and currently none of the tests have arguments that need quoting.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-09-30 15:58:49 +02:00
Anonymous Maarten 30c2cda25e Don't use assert(0) for SDL_TriggerBreak
The assert macro is disabled when building with -DNDEBUG.
On Android, the debugger stopped in the wrong frame.
2025-09-30 15:45:26 +02:00