Commit Graph

20206 Commits

Author SHA1 Message Date
Anonymous Maarten
baa1a5e2f4 Add SDL_strpbrk 2024-09-06 01:35:43 +02:00
Anonymous Maarten
55934bc85e include: add SDL_RESTRICT for restricted pointer aliasing 2024-09-06 01:35:43 +02:00
Caleb Cornett
2d4eb29c37 Add SDL_SetGPUBlendConstants, SDL_SetGPUStencilReference (#10704) 2024-09-05 17:41:23 -05:00
Sam Lantinga
04a732881a Add a test to verify structure alignment 2024-09-05 15:27:56 -07:00
Frank Praznik
9e850bdcfa docs: Update the migration doc with SDL_SetWindowModalFor() changes 2024-09-05 16:20:16 -04:00
Ozkan Sezer
c0b15e57f4 cmake: disable GPU backends for winrt 2024-09-05 22:39:02 +03:00
Ozkan Sezer
f494658f9c SDL_gpu.c: remove BOM. 2024-09-05 22:39:02 +03:00
Ozkan Sezer
cb2919ac55 [GPU] MinGW build fixes:
- CreateEventEx() is guarded by _WIN32_WINNT >= 0x0600:
  In SDL_gpu_d3d12.c, include core/windows/SDL_windows.h
  that defines _WIN32_WINNT properly to account for that
- DXGIInfoQueue stuff is not available in all toolchains
  such as mingw-w64 version 8.0.3
- SDL_gpu_d3d11.c: _WIN32 is always defined by MinGW, as
  is the case for all windows-targeting compilers, so it
  doesn't guarantee absence of DXGIInfoQueue stuff:
  rely on __IDXGIInfoQueue_INTERFACE_DEFINED__, as it is
  done elsewhere.

Fixes: https://github.com/libsdl-org/SDL/issues/10705 .
2024-09-05 22:39:02 +03:00
SDL Wiki Bot
22aeb1bbba Sync SDL3 wiki -> header 2024-09-05 19:23:35 +00:00
Frank Praznik
a46e7027ce video: Allow setting the parents of toplevel windows
Allow setting a parent/child relationship on toplevel windows, which allows raising sets of windows together, and allows child windows to always float above their parents.

Modal windows are now set by setting the parent, then toggling modal status, as the previous interface duplicated functionality now handled by SDL_SetWindowParent().
2024-09-05 15:22:23 -04:00
SDL Wiki Bot
af4c6682ce Sync SDL3 wiki -> header 2024-09-05 16:59:20 +00:00
cosmonaut
cba5ccb9cf GPU: Fix documentation formatting 2024-09-05 09:57:54 -07:00
Evan Hemsley
42a0df91bf Add padding for non-32-bit-aligned types in structs (#10701) 2024-09-05 09:52:57 -07:00
Sam Lantinga
387774ab8a Build config flags are either defined or undefined, never 0
This is for consistency with CMake build configuration

Also added SDL_VIDEO_RENDER_GPU to the non-CMake build configurations
2024-09-05 09:52:40 -07:00
David Gow
e3fd581aca GPU: vulkan: Respect swapchain minImageCount
The default value of MAX_FRAMES_IN_FLIGHT (3) may be less than the
minImageCount returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() on
some setups. For example, the Intel IVB Vulkan driver on Wayland returns
a minImageCount of 4, resulting in the following validation warning:

VUID-VkSwapchainCreateInfoKHR-presentMode-02839(ERROR / SPEC): msgNum: -76493605 - Validation Error: [ VUID-VkSwapchainCreateInfoKHR-presentMode-02839 ] | MessageID = 0xfb70ccdb | vkCreateSwapchainKHR(): pCreateInfo->minImageCount 3, which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = 4, maxImageCount = 0). The Vulkan spec states: If presentMode is not VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR nor VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, then minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-02839)
    Objects: 0

Use the minimum image count in that case, as it's as close as we'll get
to our preferred value. Note also that, unlike maxImageCount,
minImageCount is never 0 (the spec states it is always at least 1), so
we don't need a similar check to see if it applies.

Signed-off-by: David Gow <david@ingeniumdigital.com>
2024-09-05 08:10:18 -07:00
Sam Lantinga
b00bb21507 Added -Wl,--no-undefined-version to Android.mk
Make sure we aren't missing any API entry points
2024-09-05 06:52:45 -07:00
Sylvain
5db00cef96 Android.mk: allow to compile with storage functions 2024-09-05 06:52:26 -07:00
Sam Lantinga
a0f36fb85b Use atomic variables for thread communication
Fixes https://github.com/libsdl-org/SDL/issues/10711
2024-09-05 06:05:49 -07:00
Sylvain
41810c823d Compilation without vulkan: SDL_GPU_VULKAN is always defined for some plateform (at android, macos), test against 0 or 1 2024-09-05 05:36:21 -07:00
Sylvain
defbf67306 SDL_migration.cocci: add SDL_TTF/mixer/image function names to be upgraded from int returned type to bool. 2024-09-05 05:24:19 -07:00
Quinn X. J.
f61d4db39a GPU: colorAttachmentDescriptions should be const
The `colorAttachmentDescriptions` field of `SDL_GPUGraphicsPipelineAttachmentInfo` should be marked `const`,
similarly to the `vertexBindings` and `vertexAttributes` fields of `SDL_GPUVertexInputState`.
2024-09-05 05:22:52 -07:00
SDL Wiki Bot
249a74e436 Sync SDL3 wiki -> header 2024-09-05 01:25:36 +00:00
Evan Hemsley
1c8c014481 GPU: Document opaque handles and enums (#10700) 2024-09-04 18:24:11 -07:00
Sam Lantinga
20d0a1a3d1 Added a defensive check against XINPUTGETCAPABILITIES being NULL
This should never happen, but it does, possibly due to a data segment overwrite elsewhere.
2024-09-04 16:30:27 -07:00
Anonymous Maarten
ff1e252413 testautomation: remove SDLTest_TestCaseFp casts 2024-09-04 23:54:56 +02:00
Sam Lantinga
abd2ac5992 Set the desired channel count when opening audio on Android 2024-09-04 13:59:48 -07:00
Sam Lantinga
e2c9a0a427 Updated Android audio log messages 2024-09-04 13:59:48 -07:00
Evan Hemsley
1788be8547 GPU: Add const to some function parameters (#10694) 2024-09-04 13:53:41 -07:00
Ozkan Sezer
f317581c91 SDL_log.h: Use ASCII characters.
(was missed in commit 7ca676aeed for issue #10636)
2024-09-04 14:56:40 +03:00
Sam Lantinga
c9387bcca5 pipewire: spa_list_is_empty() returns bool 2024-09-03 13:45:00 -07:00
Sam Lantinga
0fd275e16e pulseaudio: fixed cleanup if couldn't connect to pulseaudio server 2024-09-03 13:34:19 -07:00
Sam Lantinga
a56315cd48 Fixed return value failing to load pulseaudio functions 2024-09-03 13:24:27 -07:00
Sam Lantinga
7ca676aeed Use ASCII characters in SDL source and headers
Fixes https://github.com/libsdl-org/SDL/issues/10636
2024-09-03 12:52:27 -07:00
Sam Lantinga
575d9cda6f The parameter to SDL_AppEvent() should be non-const
This allows functions like SDL_ConvertEventToRenderCoordinates() to work without having to copy the event.

Fixes https://github.com/libsdl-org/SDL/issues/10691
2024-09-03 08:18:36 -07:00
Daniel Ludwig
b1b4a9cd1b GDK build: PFN_D3D12_XBOX_CREATE_DEVICE not defined for Xbox One (#10690) 2024-09-03 08:09:00 -05:00
Sam Lantinga
73898a0a64 Renamed NDA platform constants to "PRIVATE" 2024-09-02 21:00:34 -07:00
Caleb Cornett
b233beca47 GPU: Minor documentation cleanup 2024-09-02 18:01:43 -07:00
SDL Wiki Bot
19fb43b94f Sync SDL3 wiki -> header 2024-09-03 00:19:03 +00:00
Sam Lantinga
46ffa82f4e Added SDL_ALPHA_OPAQUE_FLOAT and SDL_ALPHA_TRANSPARENT_FLOAT
Fixes https://github.com/libsdl-org/SDL/issues/10684
2024-09-02 17:17:48 -07:00
Sam Lantinga
18c46a3313 Fixed SDL_pen.h for SDL3 bit flag conventions 2024-09-02 17:17:48 -07:00
Sam Lantinga
35dadda327 Fixed build warnings 2024-09-02 17:17:48 -07:00
Sam Lantinga
f11e7cd06f Add annotations to README-migration.md for functions that changed return type 2024-09-02 17:17:48 -07:00
Sam Lantinga
eacf119923 Renamed SDL_size_add_overflow() and SDL_size_mul_overflow() 2024-09-02 17:17:48 -07:00
Andrei Alexeyev
fb7245fb93 GPU: Add support for more texture formats (#10641) 2024-09-02 19:14:48 -05:00
Caleb Cornett
f405def691 Change GPU flag enums to defines (#10681) 2024-09-02 15:19:43 -07:00
Sam Lantinga
d501f6db07 Make newer DRM and GBM functions optional
Fixes https://github.com/libsdl-org/SDL/issues/10675
2024-09-02 10:37:50 -07:00
Sam Lantinga
8371114009 Fixed error: multiple storage classes in declaration specifiers 2024-09-02 09:50:19 -07:00
Sam Lantinga
93423c1c46 spin_acquire_lock() takes a volatile pointer parameter 2024-09-02 09:50:19 -07:00
Sam Lantinga
01fa9cad80 Fixed error: conflicting types for 'getpagesize' 2024-09-02 09:50:19 -07:00
Sam Lantinga
8b0798a3da Fixed error: variable 'nfences' set but not used 2024-09-02 09:50:19 -07:00