Caleb Cornett
de5e0f1784
GPU: Query UnrestrictedBufferTextureCopyPitchSupported to avoid D3D12 realignment copies
...
(cherry picked from commit 742a6fd092 )
2026-01-31 16:04:03 -08:00
Lucas Murray
1a278bb511
GPU: Fix memory leak when creating D3D12 compute pipelines
2026-01-31 16:24:06 -05:00
Ethan Lee
e803cbb34a
gpu: Rank dzn above lavapipe, for WSL Vulkan support
2026-01-31 08:35:04 -05:00
Eddy Jansson
ff2a43bfbf
Fix typos in comments.
...
(cherry picked from commit 23fec649c2 )
2026-01-30 07:25:35 -08:00
Ethan Lee
5a4f1cbceb
gpu: MSVC buildfix for Vulkan device property struct initialization
2026-01-30 09:41:05 -05:00
Ethan Lee
c4074bc9c9
gpu: Check for Vulkan conformance while checking the device rank.
...
This should behave largely the same, except now Dozen is given a pass for WSL.
This is a better fix for #14915 .
2026-01-30 09:22:13 -05:00
Sam Lantinga
e612c58518
Reference count window claim calls for a given GPU device
...
Fixes https://github.com/libsdl-org/SDL/issues/14918
(cherry picked from commit 696c12826f )
2026-01-29 14:05:13 -08:00
Ethan Lee
dfb270f87c
gpu: Vulkan should fail if the best device is non-conformant
2026-01-29 14:42:17 -05:00
Sam Lantinga
34c687a59b
Add the type to SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1
...
(cherry picked from commit 17c375738f )
2026-01-25 09:16:00 -08:00
Ethan Lee
78b16b3cb8
gpu: Add SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1 property
...
(cherry picked from commit 16f2037efd )
2026-01-25 09:09:28 -08:00
Madeline Whitmore
e48e8a48ad
SDL GPU: Fix features not being enabled with Vulkan 1.1 ( #14885 )
...
Use pre-Vulkan 1.2 structs to request features from a Vulkan 1.1 instance.
(cherry picked from commit 97b177c92f )
2026-01-25 08:19:42 -08:00
Eddy Jansson
1d6d424775
Prefer SDL_zero()/SDL_zerop()
...
Replace uses of 'SDL_memset(E, 0, sizeof(E))' and similar
with the SDL_zero()/SDL_zerop() macros.
(cherry picked from commit 83fb7b6636 )
2026-01-23 11:23:55 -08:00
Lucas Murray
9a5700e9a3
GPU: Add error message to Vulkan buffer creation error path
...
(cherry picked from commit cced3ce8b9 )
2026-01-04 15:18:11 -08:00
Ethan Lee
cbed9bd54d
gpu: D3D12 uploads should also factor in block size for height, not just width.
...
It turns out the reason this function was having so many overread issues was because our row copies were wrong - for compressed images we also need to reduce the row count based on the block size, similar to what we already do for pitch calculation - these copies are byte copies, not pixel copies!
(cherry picked from commit f472f93db8 )
2026-01-02 07:37:56 -08:00
Sam Lantinga
80c6a5f8d9
Updated copyright for 2026
2026-01-01 09:48:19 -08:00
Frank Praznik
cb4f33b644
gpu: Use the window event watcher list for Vulkan and D3D12
...
Events won't be delivered to the regular event watcher list callbacks if a client event filter discards events. Use the special window event watcher list to watch for resizes in the GPU renderers, as events are delivered to this list before a client can potentially discard them.
2025-12-30 22:18:19 -05:00
Edgar San Martin, Jr.
bd29d60d3c
GPU: Add bounds validation for slot bindings and uniform data pushes. ( #14692 )
2025-12-23 08:36:06 -08:00
999pingGG
5a257202d2
GPU: Better detection of surface destruction
2025-12-21 17:16:34 -08:00
999pingGG
190b902fac
GPU: Fix Android surface and swapchain recreation on app resume ( #14676 )
2025-12-19 09:54:08 -08:00
Nuno Silva
d94cd1efad
GPU: Ensure Vulkan doesn't pass unsupported feature structures for requested vulkan version ( #14662 )
2025-12-15 17:57:49 -08:00
Evan Hemsley
1260c10aab
GPU Vulkan: Only modify surface on window claim or release ( #14659 )
2025-12-15 12:54:16 -08:00
Jakub Wasilewski
73c9f25867
GPU: Metal: Rebind storage buffers when changing the pipeline moves them.
2025-12-15 11:45:29 -08:00
Arnoldo Adonaí Barón Robles
e5731f9bac
GPU: Fix crash on Android upon returning from the background
2025-12-10 20:58:19 -05:00
LuncyBloont
ab67be7e5a
Fix crash in UploadToTexture() on DX12.
2025-12-05 11:46:41 -08:00
Jakub Wasilewski
f5ea8805e1
Change how WinPixEventRuntime.dll is used under D3D12/Windows. ( #14600 )
...
* GPU: D3D12: Missing WinPixEventRuntime.dll now logs warning at device creation time.
* GPU: D3D12: Debug label functions are now a no-op when WinPixEventRuntime.dll is missing.
* Docs: GPU: Debug function documentation now notes WinPixEventRuntime.dll is required under D3D12.
2025-12-05 09:40:57 -08:00
cosmonaut
aae2f74ae6
GPU: Remove erroneous buffer usage flag from defrag process
2025-12-03 15:03:25 -08:00
Jakub Wasilewski
0c5ad99ec1
GPU: D3D12: Use WinPixEventRuntime.dll for debug events when available.
...
This prevents validation errors on D3D12 caused by the previous solution
that utilized internal D3D12 functions. This is still the fallback
solution if WinPixEventRuntime.dll is not present in PATH, but a warning
is printed to let you know how to fix these errors.
2025-12-03 12:00:17 -08:00
Evan Hemsley
2b1904a849
GPU: Prefer D3D12 over Vulkan when available
2025-12-01 17:50:23 -05:00
Antti Ala-Fossi
29f3844b01
Fix assert in SDL_BeginGPURenderPass
2025-11-25 10:46:53 -08:00
Sam Lantinga
1fc093491a
vulkan gpu: set the sample count for depth prepass
...
Fixes https://github.com/libsdl-org/SDL/issues/14500
2025-11-22 07:53:16 -08:00
Ethan Lee
9dbde4542c
gpu: Windows 11 guarantees a D3D12 minimum, skip checks accordingly
2025-11-12 16:22:35 -05:00
Ethan Lee
04a62cba1f
gpu: Set up D3D12 device checks to avoid unnecessary queries
2025-11-12 11:19:07 -05:00
Ethan Lee
b2585ac236
gpu: Vulkan feature/extension lists do not need to be stored in the renderer
2025-11-11 21:24:45 -05:00
Ethan Lee
536507101d
gpu: De-duplicate property enumeration for Vulkan features
2025-11-11 20:58:14 -05:00
TheSniperFan
ac0f77b7e6
Allow SDL GPU to opt into additional Vulkan features ( #14204 )
2025-11-11 15:53:06 -08:00
Maia
5ec6147acb
Add missing type suffix to SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION prop
2025-11-11 10:37:27 -05:00
Ethan Lee
b5624e14ff
gpu: Add SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION property
2025-11-10 20:20:05 -05:00
Ethan Lee
0b2073d143
gpu: Remove dead code in the Vulkan device ranking system.
...
This block was a sloppy way of trying to avoid prioritizing lavapipe over another device, but truthfully the only way to guarantee avoiding CPU drivers is to add a property to allow apps to require hardware acceleration.
2025-11-10 18:16:54 -05:00
Ethan Lee
1b79ba9ab6
gpu: Separate device suitability from device rank when enumerating Vulkan devices.
...
This makes it a bit clearer what the "minimum" is vs. the "best", which should be two separate queries.
2025-11-10 18:16:54 -05:00
Ethan Lee
6976b57988
gpu: Move device ranking to the bottom of IsDeviceSuitable.
...
This prevents devices without presentation/graphics support from getting ranked.
2025-11-10 18:16:54 -05:00
Ethan Lee
799c6aa629
gpu: Move device ranking to a standalone function.
...
This allows us to treat Dozen as an "other" driver, rather than blacklisting it outright.
2025-11-10 18:16:54 -05:00
Ethan Lee
0cc2b026e7
gpu: Check for MSFT_layered_driver, skip layered drivers during enumeration
2025-11-10 18:16:54 -05:00
Chris Genova
6a01d6e7d3
D3D12 GPU: Prevent reading out of bounds when uploading textures.
...
When the upload needs realignment, a new buffer is created to do the
upload, and the source data is copied to the new buffer. This commit
fixes the issue where the memcopy can read off the end of the source
buffer since it is reading based on destination pitch instead of source
pitch.
2025-11-07 17:47:51 -08:00
Sam Lantinga
4db63e323e
Save a copy of the D3D12 semantic string
...
Fixes https://github.com/libsdl-org/SDL/issues/14383
2025-11-02 16:16:20 -08:00
Katelyn Gadd
9479ac039c
If VULKAN_Submit fails during VULKAN_INTERNAL_CreateTexture, destroy the texture and return NULL
2025-10-20 16:24:20 -07:00
Eddy Jansson
aaee09d6ed
Don't do NULL-checks before SDL_free()
...
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
2025-10-20 00:13:09 -07:00
TheSniperFan
cbcb145eb4
Fix debug mode being set too late
...
-Early error messages were always being skipped
2025-10-18 08:04:11 -07:00
Ethan Lee
2135ecdfcc
gpu: Vulkan on private platforms cannot make use of oldSwapchain, destroy the full swapchain on resize
2025-10-16 15:18:07 -04:00
Evan Hemsley
20206b8e66
GPU: Correctly recycle D3D12 descriptor heaps ( #14234 )
2025-10-13 13:00:00 -07:00
cosmonaut
b067dfa345
GPU: Validate that buffer size is at least 4 bytes
2025-10-13 11:04:59 -07:00