Commit Graph

154 Commits

Author SHA1 Message Date
Evan Hemsley
423337796c GPU Vulkan: Use dedicated allocation for download buffers (#11298) 2024-10-23 09:37:06 -07:00
Sam Lantinga
97f1da73da Rename GPU properties for consistency 2024-10-15 15:36:26 -07:00
Caleb Cornett
cdaaabb978 GPU: Fix Metal sampler address mode order 2024-10-15 10:46:04 -04:00
cosmonaut
00bb81de76 GPU: Allow size queries on depth formats 2024-10-14 14:28:21 -07:00
cosmonaut
57f2577c65 GPU Vulkan: Fix depth-only framebuffer leak 2024-10-14 10:19:07 -07:00
Evan Hemsley
82598e5ca9 GPU Vulkan: Fix frame counter timing (#11189) 2024-10-12 22:02:22 -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
Caleb Cornett
3db10a6b2c GPU: ASTC block size fixes (#11157) 2024-10-10 15:40:21 -07:00
David Gow
9c322386bf gpu: vulkan: Fix an uninitialised structure in SDL_BlitGPUTexture()
The SDL_GPUColorTargetInfo structure needs to be zeroed, as otherwise we
can end up trying to create a resolve_texture which doesn't exist,
causing a rather difficult-to-debug segfault when calling
SDL_BlitGPUTexture() with a load op of SDL_GPU_LOADOP_CLEAR.
2024-10-10 07:16:02 -07:00
Evan Hemsley
da5a1585cd GPU: Avoid calling SDL_GetWindowSizeInPixels when possible (#11139) 2024-10-09 18:59:07 -07:00
Daniel Ludwig
acb18e05b5 GPU: fix swapchain buffer size not set on Xbox 2024-10-09 07:30:13 -07:00
Delta
8e6ead2f7b [GPU] Added ASTC texture format support (#11116) 2024-10-08 18:45:04 -04:00
rabbit-ecl
6ae5666acf Check for VK_SUBOPTIMAL_KHR also in vkQueuePresentKHR (#11113)
This is already handled for vkAcquireNextImageKHR.
2024-10-07 13:01:10 -07:00
Daniel Ludwig
69196ab30d Change evasive library handle to SDL_SharedObject* 2024-10-04 05:18:40 -04:00
Ryan C. Gordon
3a6a3ab64f gpu: Fix memory leak in Vulkan backend. 2024-10-04 04:46:28 -04:00
Ryan C. Gordon
0b5e01a305 loadso: library handles are now SDL_SharedObject* instead of void*.
Improved the SDL_loadso.h documentation a little, too.

Fixes #11009.
2024-10-01 12:16:10 -04:00
Sam Lantinga
3234a3b902 Simplified internal SDL_Surface structure 2024-10-01 08:10:04 -07:00
cosmonaut
fa14b53273 GPU Vulkan: Clear up some swapchain edge cases 2024-09-30 15:10:27 -07:00
Evan Hemsley
afdf325fb4 GPU: Add swapchain dimension out params (#11003) 2024-09-30 10:23:19 -07:00
Evan Hemsley
fc242abbd2 GPU: recreate swapchain on window pixel size change event (#10985) 2024-09-28 18:09:56 -07:00
Ethan Lee
0852307b58 gpu: Check Vulkan device features for IsDeviceSuitable 2024-09-27 19:58:30 -04:00
cosmonaut
fb165a542b GPU Vulkan: add resolve info to framebuffer and render pass lookups 2024-09-27 15:57:57 -07:00
Ozkan Sezer
1088ea55fa SDL_gpu_d3d11.c: define D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD for old toolchains 2024-09-27 23:55:02 +03:00
cosmonaut
de40d6bae0 GPU Metal: Set texture to NULL even if AcquireSwapchainTexture fails 2024-09-27 13:49:26 -07:00
cosmonaut
eedd2039f9 GPU: 32-bit component texture formats 2024-09-27 16:26:43 -04:00
Evan Hemsley
05d0656bd6 GPU: Simultaneous compute pass read-write (#10965) 2024-09-27 12:49:37 -07:00
Sam Lantinga
d39acc6d1e Fixed warning C4702: unreachable code 2024-09-27 11:19:54 -07:00
Caleb Cornett
5ff6e8d522 GPU: Add enable_depth_clip to RasterizerState (#10964) 2024-09-27 11:18:54 -05:00
Daniel Ludwig
e98cf3c870 Fix Xbox builds 2024-09-27 08:10:03 -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
cosmonaut
925e47a077 GPU: Fix backwards LogError and SetError calls 2024-09-25 12:47:40 -07:00
cosmonaut
557c6dfb18 GPU: call SDL_SetError where appropriate 2024-09-25 10:47:14 -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
Evan Hemsley
980b4ff6db GPU: Vulkan descriptor management rewrite (#10910) 2024-09-20 12:55:39 -07:00
Sam Lantinga
481203c074 Fixed Xcode warnings 2024-09-18 13:20:53 -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
bd04459cde Fix typos (thanks @qndel!)
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb)
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
    events/imKStoUCS.* \
    hidapi \
    joystick/controller_type.c \
    joystick/controller_type.h \
    joystick/hidapi/steam/controller_constants.h \
    joystick/hidapi/steam/controller_structs.h \
    libm \
    stdlib/SDL_malloc.c \
    stdlib/SDL_qsort.c \
    stdlib/SDL_strtokr.c \
    video/khronos \
    video/x11/edid.h \
    video/x11/edid-parse.c \
    video/x11/xsettings-client.* \
    video/yuv2rgb
2024-09-18 08:18:26 -07:00
Sam Lantinga
bc9780299c Don't define backends if SDL_GPU_DISABLED is set 2024-09-17 09:40:29 -07:00
Sam Lantinga
8d223b3037 Renamed atomic functions to match SDL 3.0 naming convention
This will also allow us to cleanly add atomic operations for other types in the future.
2024-09-17 08:53:27 -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
Caleb Cornett
4f722d372a GPU: Metal vertex buffer indices should grow upward (#10837) 2024-09-15 20:17:43 -05:00
Sam Lantinga
19243092c6 Renamed SDL_GpuGraphicsPipelineTargetInfo to SDL_GPUGraphicsPipelineTargetInfo
Fixes https://github.com/libsdl-org/SDL/issues/10855
2024-09-15 07:46:26 -07:00
Ozkan Sezer
a833ee2e63 SDL_gpu.c: fixed build when SDL_GPU_DISABLED is defined. 2024-09-14 20:40:56 +03:00
Sam Lantinga
90e01040c5 Added thread-safe environment functions
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.

As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
2024-09-13 22:14:54 -07:00
Ethan Lee
16ff7503b7 gpu: Update GPU support queries to better match naming conventions 2024-09-13 23:08:44 -04:00