Ozkan Sezer
ec1d66d4f6
Revert "GPU: Add bounds validation for slot bindings and uniform data pushes. ( #14692 )"
...
This reverts commit 4b0a1df21f .
(Was cherry picked from commit bd29d60d3c )
2025-12-25 02:10:02 +03:00
Edgar San Martin, Jr.
4b0a1df21f
GPU: Add bounds validation for slot bindings and uniform data pushes. ( #14692 )
...
(cherry picked from commit bd29d60d3c )
2025-12-23 08:36:56 -08:00
cosmonaut
b3f4ba0725
GPU: Validate that buffer size is at least 4 bytes
...
(cherry picked from commit b067dfa345 )
2025-10-13 11:07:22 -07:00
Sam Lantinga
840d5c16d2
Temporarily disabled texture binding validation
...
There are some advanced use cases that trip over this, so temporarily disabling the validation pending further review.
Reference: https://github.com/libsdl-org/SDL/issues/13871
(cherry picked from commit a2a60f75c7 )
2025-10-08 19:53:05 -07:00
Jordan Saunders
589aea50c2
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
(cherry picked from commit 265236d952 )
2025-08-30 06:05:43 -07:00
Petar Popovic
64b2af0340
SDL_gpu.c: Fixed deref-before-check warning
...
(cherry picked from commit 6a5af95364 )
2025-07-26 12:08:57 -07:00
Ryan C. Gordon
9995174e68
gpu: Fixed uninitialized variable in SDL_AcquireGPUCommandBuffer().
...
Fixes #13191 .
(cherry picked from commit 190afc0f4f )
2025-07-11 18:23:15 -04:00
WillyJL
2bff72b4f6
SDL3 GPU: Fix -Wbool-conversion warnings
...
(cherry picked from commit 4eff36ef53 )
2025-06-29 13:33:56 -04:00
Evan Hemsley
25816bea41
GPU: Binding validation and prevent null dereference if expected binding is missing ( #13164 )
2025-06-02 13:40:40 -07:00
cosmonaut
eb57d94ec5
GPU: Add missing compute-writeable texture formats
2025-05-19 18:11:06 -07:00
Logan
9571b0ece8
GPU: Update to set supported shader formats inside CreateDevice
...
(cherry picked from commit 8289656a4e )
2025-05-18 18:33:07 -07:00
Evan Hemsley
142700f909
GPU: Check that a texture format is valid for compute writes ( #13044 )
2025-05-14 16:25:24 -07:00
Evan Hemsley
f3611681df
GPU: Always return NULL if beginning a pass fails an assert check
2025-05-14 15:23:57 -07:00
cosmonaut
2001cc15d5
GPU: Debug mode layer and level index checks
2025-05-14 12:25:18 -07:00
Evan Hemsley
9f1a1405a6
GPU: Special case to avoid assert on GenerateMipmaps ( #12995 )
...
(cherry picked from commit 86b206dadf )
2025-05-09 22:00:57 -07:00
Evan Hemsley
56c76c20a0
GPU: Validate that textures are not bound for both read and write on render passes ( #12925 )
...
(cherry picked from commit a163257295 )
2025-04-29 16:53:45 -07:00
Sam Lantinga
ed8e7e85f0
SDL_ClaimWindowForGPUDevice() should fail for transparent windows
...
The GPU API doesn't currently support transparent windows (transparent swapchain effects doesn't seem possible on D3D12) so we should explicitly fail so users don't expect transparency and then not get it.
Fixes https://github.com/libsdl-org/SDL/issues/12410
(cherry picked from commit 2fbb583290 )
2025-03-21 12:15:09 -07:00
Ethan Lee
db817a37f4
gpu: Fix forward declaration and inclusion of PrivateGPUDriver
2025-02-24 15:46:39 -05:00
Caleb Cornett
60b7faa987
gpu: Validate that reserved struct members are unset
2025-02-24 08:57:09 -08:00
coffeechriph
55fd205ba4
Add missing integer texture formats to SDL_GPUTextureFormatTexelBlockSize ( #12151 )
2025-02-11 14:21:30 -08:00
cosmonaut
4294c06836
GPU: Check texture format support in pipeline creation
2025-01-14 10:16:20 -08:00
Evan Hemsley
fb6df93384
GPU: Add name properties to resources ( #11946 )
2025-01-13 17:29:08 -08:00
Sam Lantinga
f2074d7af3
Updated copyright for 2025
2025-01-01 07:45:52 -08:00
Evan Hemsley
3ee39f6c3f
GPU: Revise swapchain acquisition ( #11633 )
...
---------
Co-authored-by: Lucas Murray <22484+lmurray@users.noreply.github.com >
2024-12-11 11:16:35 -08:00
Anonymous Maarten
fb71b44231
gpu: define EXPAND_ARRAY_IF_NEEDED macro once and make it function-like
2024-12-09 00:01:16 +01:00
Evan Hemsley
fa5f84fb6e
GPU: Add SetGPUAllowedFramesInFlight ( #11599 )
2024-12-06 11:56:20 -08:00
cosmonaut
5a74aadac9
GPU: Null check shader inputs in CreateGPUGraphicsPipeline
2024-11-12 14:31:13 -08:00
Evan Hemsley
119b4fa5f5
GPU: Remove D3D11 backend and allow D3D12 to ingest DXBC ( #11456 )
2024-11-12 10:55:21 -08:00
Evan Hemsley
b4dff42dcd
GPU: Add SDL_CancelGPUCommandBuffer ( #11316 )
...
---------
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com >
2024-10-29 14:43:22 -07:00
Sam Lantinga
97f1da73da
Rename GPU properties for consistency
2024-10-15 15:36:26 -07:00
cosmonaut
00bb81de76
GPU: Allow size queries on depth formats
2024-10-14 14:28:21 -07:00
Sam Lantinga
25251a9405
Fixed warning C4723: potential divide by 0
2024-10-11 19:31:22 -07:00
Evan Hemsley
6ea4a66451
GPU: Add SDL_CalculateGPUTextureFormatSize ( #11146 )
...
---------
Co-authored-by: Sam Lantinga <slouken@libsdl.org >
2024-10-10 16:34:38 -07:00
Delta
8e6ead2f7b
[GPU] Added ASTC texture format support ( #11116 )
2024-10-08 18:45:04 -04:00
Evan Hemsley
afdf325fb4
GPU: Add swapchain dimension out params ( #11003 )
2024-09-30 10:23:19 -07:00
Evan Hemsley
05d0656bd6
GPU: Simultaneous compute pass read-write ( #10965 )
2024-09-27 12:49:37 -07:00
Evan Hemsley
be401dd1e3
GPU: More robust error reporting ( #10958 )
...
---------
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com >
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com >
2024-09-27 00:30:18 -07:00
Ethan Lee
4a3faf20ac
gpu: Replace high-level logs with SetError
2024-09-23 10:57:10 -04:00
mausimus
0685b96469
GPU: fix build when SDL_GPU_DISABLED is set
2024-09-23 08:09:17 -04:00
Caleb Cornett
97d1056e16
GPU: MSAA fixes ( #10917 )
2024-09-21 17:38:10 -05:00
Evan Hemsley
89c6bc5f50
Prefer Vulkan even on Windows ( #10912 )
2024-09-20 13:42:15 -07:00
Sam Lantinga
a90ad3b0e2
Removed SDL_bool in favor of plain bool
...
We require stdbool.h in the build environment, so we might as well use the plain bool type.
If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Sam Lantinga
bc9780299c
Don't define backends if SDL_GPU_DISABLED is set
2024-09-17 09:40:29 -07:00
Caleb Cornett
c499f79fe9
GPU: Fix multisample texture usage validation
2024-09-16 17:55:27 -05:00
Caleb Cornett
9416917353
GPU: Rework MSAA ( #10859 )
2024-09-16 12:19:09 -05:00
Ozkan Sezer
a833ee2e63
SDL_gpu.c: fixed build when SDL_GPU_DISABLED is defined.
2024-09-14 20:40:56 +03:00
Ethan Lee
16ff7503b7
gpu: Update GPU support queries to better match naming conventions
2024-09-13 23:08:44 -04:00
Ethan Lee
0160e9eac6
gpu: Add SDL_QueryGPUSupport
2024-09-13 13:42:07 -04:00
Ethan Lee
96e147b2b9
gpu: Rework driver name queries, add GetGPUShaderFormats
2024-09-13 12:29:40 -04:00
Ethan Lee
371cfaf8fe
gpu: Implement support for SDL_GPU_DISABLED
2024-09-13 10:32:12 -04:00