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
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
Sam Lantinga
2a92a3c9c5
Recreate the Vulkan GPU swap chain when resuming on Android
...
Fixes https://github.com/libsdl-org/SDL/issues/12957
2025-10-08 21:06:17 -07:00
Sam Lantinga
00ffddece8
Ignore VK_SUBOPTIMAL_KHR on the Android platform
...
This is returned whenever the device has been rotated, and can be safely ignored.
Fixes https://github.com/libsdl-org/SDL/issues/12950
2025-10-08 20:02:31 -07:00
HTuanPhong
2638537f92
Fix vulkan gpu resize lag on windows
2025-10-04 15:22:28 -07:00
Mathieu Eyraud
86da08b0be
Zero-initialize SDL_GPUDevice
2025-10-01 07:22:17 -07:00
Sam Lantinga
f61e271e11
Generalize and validate optional GPU feature properties
...
Fixes https://github.com/libsdl-org/SDL/issues/13139
Fixes https://github.com/libsdl-org/SDL/issues/13138
2025-09-29 12:42:47 -07:00
Sam Lantinga
595f7b7ed9
Revert "Fixed Vulkan validation error"
...
This reverts commit b82b1f416f .
The renderer should not be enabling depth clamping.
2025-09-29 06:08:27 -07:00
Sam Lantinga
b82b1f416f
Fixed Vulkan validation error
...
VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782(ERROR / SPEC): msgNum: -316906200 - Validation Error: [ VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782 ] | MessageID = 0xed1c6528 | vkCreateGraphicsPipelines(): pCreateInfos[0].pRasterizationState->depthClampEnable is VK_TRUE, but the depthClamp feature was not enabled. The Vulkan spec states: If the depthClamp feature is not enabled, depthClampEnable must be VK_FALSE (https://vulkan.lunarg.com/doc/view/1.3.268.0/windows/1.3-extensions/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782 )
2025-09-28 22:10:06 -07:00
ManifoldFR
8bc4e029bd
gpu/vulkan : fix clear value indexing
2025-09-16 08:45:35 -07:00
cosmonaut
9603360b7e
GPU: Allow rendering into depth texture layers and levels
2025-09-13 07:11:43 -07:00
Luis Caceres
03d0c2ad74
gpu/vulkan: Move dereference after null check
2025-09-08 12:19:53 -04:00
Ethan Lee
689049f8ec
gpu: VK_KHR_get_physical_device_properties2 can be optional
2025-09-02 09:53:01 -07:00
Jordan Saunders
265236d952
Fix two uninitialized variables
...
Found when running in valgrind looking at another issue.
- RenderPass' depth_stencil_target
Tripped in SDL_BindGPUFragmentSamplers when not binding a DS target
- VulkanCommandBuffer's swapchainRequested
Tripped in VULKAN_Submit for the end transition barrier when
creating an image. The field is only reset when reused, not on first
use
2025-08-30 06:05:22 -07:00
Jaan Soulier
0bbdd86b86
Fix device suitability checks in Vulkan GPU backend to always adhere to priority arrays
2025-08-27 05:15:24 -07:00
Wilson Jallet
03b14f5211
GPU: Fix Vulkan indexing error for resolve attachment refs ( #13768 )
2025-08-19 12:10:55 -07:00
suleyth
bad7075de8
Only add VRAM to deviceRank if asking for a high performance device, and if the device already meets all the requirements.
2025-08-17 23:17:37 -04:00
suleyth
618f85fafe
Make deviceRank an Uint64 to avoid potential overflow issues in case of future GPUs with huge VRAM
2025-08-17 23:17:37 -04:00
suleyth
c5b79e5f1b
Pick dedicated GPU with highest VRAM
2025-08-17 23:17:37 -04:00
Beyley Cardellio
e699f3dca1
GPU: Hold submit lock before waiting for device idle
2025-08-10 07:21:55 -07:00
cosmonaut
fe6b2161bf
GPU: Fix uninitialized value in Vulkan command buffer structure
2025-08-07 13:42:03 -07:00
Frank Praznik
42463569d5
GPU: Vulkan backend flags command buffer for cleanup when swapchain is requested
...
When skipping presentation due to the window being hidden, presentDataCount is not incremented on the command buffer, and subsequently the submitted command buffers will not be cleaned up as long as the window is hidden. This results in a lag spike when showing the window due to all previously submitted command buffers suddenly being cleaned up at once, and lag at shutdown due to an equivalent number of fences needing to be destroyed.
Instead of relying on presentDataCount to determine whether a command buffer should be cleaned up, use a flag, which is set under the appropriate circumstances.
2025-08-02 09:24:02 -07:00
cosmonaut
c5edf4bd5b
GPU: Bail out of aquiring Vulkan swapchain if window is hidden
2025-07-31 16:02:58 -07:00
Cheney Wang
d8ac51859e
GPU: Fix wrong Vulkan swapchain size when retrying acquire
2025-07-30 15:34:56 -07:00
Petar Popovic
f27dbb22f0
Fix two use-after-free warnings
2025-07-29 12:29:19 -07:00
Acclution
8bd29f7ca3
GPU: Fix Vulkan compute uniform descriptor not being marked as set ( #13389 )
2025-07-18 15:27:31 -07:00
Evan Hemsley
bc5c9a686c
GPU: Clean up properties in SDL_ReleaseGPUTexture ( #13378 )
2025-07-17 00:21:34 -07:00
WillyJL
4eff36ef53
SDL3 GPU: Fix -Wbool-conversion warnings
2025-06-29 13:32:21 -04:00
Sam Lantinga
d7939abf42
Use consistent style for pointer declarations and casts
2025-06-18 10:03:44 -07:00
Evan Hemsley
fbba5b272a
GPU: Binding validation and prevent null dereference if expected binding is missing ( #13164 )
2025-06-02 13:39:58 -07:00
Ethan Lee
510126ee63
gpu: Check shader format support in PrepareDriver
2025-05-19 08:20:33 -07:00
Logan
8289656a4e
GPU: Update to set supported shader formats inside CreateDevice
2025-05-18 18:32:50 -07:00
Manuel
f85f83ec7c
SDL GPU: Implemented opt out Vulkan device features ( #13016 )
2025-05-13 17:28:28 -07:00
Sam Lantinga
cd95152b2c
Fixed crash if out of memory in the Vulkan GPU driver
2025-05-13 09:07:15 -07:00
Dominic Bolin
2ae3418260
GPU Vulkan: set correct destination usage mode for storage buffer read/write bindings ( #13009 )
2025-05-11 16:11:45 -07:00
dbolin
6344712b04
GPU Vulkan: fix for Swapchain Semaphore Reuse
2025-05-10 07:54:50 -07:00
Evan Hemsley
e1a41c1c97
GPU Vulkan: Add locks for layout object lookups ( #12924 )
2025-04-29 15:43:28 -07:00
Lucas Murray
6e4ace310c
GPU: Validate shader bytecode
2025-04-22 13:07:37 -07:00