Commit Graph

1553 Commits

Author SHA1 Message Date
Ethan Lee
a4cd62ef93 render: Reduce scope of D3D12 GDK event watcher to Xbox 2026-02-25 09:23:20 -05:00
Ethan Lee
5770e013c2 gdk: Render/GPU can call SuspendX, document when to call SuspendComplete 2026-02-25 09:20:25 -05:00
Brenton Bostick
a5889b0e44 make sure #endif comment matches the macro name 2026-02-24 09:48:57 -08:00
Void Star Caster
4a4ae4a79d Fix GetSampler() bug for INDEX8 pixel format (#15099) 2026-02-24 08:05:30 -08:00
Gokul Mittal
8d2b6c09c5 undefine ADD_TRIANGLE macro definition
ADD_TRIANGLE macro function in SDL_RenderLines() was never being undefined even after it's purpose was resolved.
2026-02-15 08:37:46 -08:00
Ryan C. Gordon
fc570a1a1c render: opengl and opengles2 renderers try to disable GL_FRAMEBUFFER_SRGB.
Reference Issue #14898.
2026-02-14 16:33:21 -05:00
RaceTheMaSe
f1a7a64eb4 Fix warnings: Extra semi - macro usage (#15015) 2026-02-08 16:58:53 -08:00
Sam Lantinga
6feb0e1333 You can't combine SDL_STRINGIFY_ARG() and SDL_FUNCTION
Removed obsolete documentation that shows this usage and macros that attempt it.

Also allow SDL_FUNCTION to be redefined by the application.

Fixes https://github.com/libsdl-org/SDL/issues/15004
2026-02-08 11:51:34 -08:00
Sam Lantinga
4de62c35c0 Fixed checking against cached shader params (thanks @ccawley2011!) 2026-02-08 10:59:18 -08:00
RaceTheMaSe
7c7ffb9115 tests: Fix unreachable code warnings (#14993) 2026-02-07 20:42:59 +03:00
RaceTheMaSe
863912aa03 PS2, VITA: Fix void pointer arithmetic warnings (#14995) 2026-02-07 20:39:33 +03:00
Max Seidenstücker
8f8880a8eb Merge all occurances of __func__ and __FUNCTION__ to SDL_FUNCTION 2026-02-07 07:34:11 -08:00
Ryan C. Gordon
60690ff829 render: OpenGL and GLES2 should explicitly request a not-sRGB-capable context.
Reference Issue #14898.
2026-02-06 13:44:20 -05:00
Sam Lantinga
fdfcfc0566 Make sure native textures have the same channel precision if possible
Fixes https://github.com/libsdl-org/SDL/issues/14882
2026-02-06 09:50:18 -08:00
Wohlstand
a36ef1f187 SDL_render_psp.c: Also apply the similar fix to PSP
Since this problem is the same here
2026-02-06 09:02:41 -08:00
Wohlstand
87a81bd09d SDL_render_vita_gxm.c: Fixed the black screen due to zero cliprect 2026-02-06 09:02:41 -08:00
Wohlstand
75d1d64c75 Revert "Reverted Vita cliprect changes"
This reverts commit aeb4b3d2fc.
2026-02-06 09:02:41 -08:00
Sam Lantinga
4970067c9a Use SDL_PixelFormat appropriately 2026-02-02 09:46:13 -08:00
Ethan Lee
5640647e14 render: D3D12 Xbox buildfixes 2026-02-02 10:10:08 -05:00
Cameron Gutman
4743f97c39 Fix invalidation of bound textures/shaders across a renderer flush on D3D9 2026-01-31 17:17:07 -08:00
Wouter Wijsman
c1e715439a Fix PSP_QueueGeometry funcion rendering some textures too small 2026-01-28 07:39:04 -08:00
Sam Lantinga
a929eb71b3 Set SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN for the GPU renderer 2026-01-25 09:14:29 -08:00
Eddy Jansson
248223592a More prefer SDL_zero*()
Transform clearing of arrays into SDL_zeroa(), and
clearing through a T* with size(T) into SDL_zerop().

Extends commit 83fb7b6636.
2026-01-23 16:02:16 -08:00
Eddy Jansson
83fb7b6636 Prefer SDL_zero()/SDL_zerop()
Replace uses of 'SDL_memset(E, 0, sizeof(E))' and similar
with the SDL_zero()/SDL_zerop() macros.
2026-01-23 11:23:27 -08:00
Cameron Cawley
07be29b625 Support 16-bit packed texture formats with the Vulkan renderer 2026-01-19 08:29:01 -08:00
Cameron Cawley
ab7d275113 Support 16-bit packed texture formats with the GPU renderer 2026-01-18 12:48:24 -08:00
Cameron Cawley
01d8e37a16 Support 16-bit packed texture formats with the Direct3D 12 renderer 2026-01-18 10:08:59 -08:00
Cameron Cawley
285147c627 Support 16-bit packed texture formats with the Direct3D 11 renderer 2026-01-18 10:08:59 -08:00
Sam Lantinga
3f0e0975d8 SDL_CreateGPURenderState() doesn't modify the createinfo parameter 2026-01-17 20:48:30 -08:00
Cameron Cawley
4af4c97e44 Support 16-bit packed texture formats with the Metal renderer 2026-01-16 17:29:39 -08:00
Void Star Caster
b1aaa41921 gpu renderer: always pass tex_coord to fragment shader
As suggested in #14843, pass vertex tex_coord to vertex shader and to fragment shader even when no texture is bounded so they can be used by custom fragment shaders.
2026-01-16 16:22:06 -08:00
Cameron Cawley
1077486872 Support more texture formats with the Direct3D 9 renderer 2026-01-16 11:01:14 -08:00
DarkContact
044aed1f27 Add support for GPU ARGB1555 (B5G5R5A1_UNORM) textures with DX11 2026-01-07 10:08:59 -08:00
Ethan Lee
b12a88af76 render: Add support for private-platform shaders in GPU backend 2026-01-05 09:48:34 -05:00
Sam Lantinga
5f086e7623 Updated copyright for 2026 2026-01-01 09:40:08 -08:00
Sam Lantinga
9698e20399 gpu renderer: fixed memory leak when resizing the backbuffer
Fixes https://github.com/libsdl-org/SDL/issues/14734
2025-12-31 08:00:26 -08:00
Sam Lantinga
38345adff0 Don't set the active texture when creating a palette
Fixes https://github.com/libsdl-org/SDL/issues/14705
2025-12-29 09:36:13 -08:00
anonymix007
89dd2426cf Add SDL_PROP_TEXTURE_CREATE_VULKAN_LAYOUT_NUMBER 2025-12-27 10:23:12 -08:00
Sam Lantinga
63636c8403 Fixed warning: implicit conversion loses integer precision 2025-12-16 14:51:19 -08:00
Sam Lantinga
aeb4b3d2fc Reverted Vita cliprect changes
Temporarily backing out cliprect changes which caused logical presentation regressions.

Fixes https://github.com/libsdl-org/SDL/issues/14645
Reopens https://github.com/libsdl-org/SDL/issues/13034
2025-12-16 08:47:45 -08:00
Ryan C. Gordon
b3cdeb942a opengl: default to vsync=0 everywhere.
This reverts commit 3ee29f2e7a, among other
changes. This means getting a scary warning on the javascript console in
Emscripten by default, but this is easily fixed by setting a GL swap
interval at startup or creating a 2D renderer with the appropriate property
(or call to SDL_SetRenderVSync()).

Fixes #14625.
2025-12-08 15:12:17 -05:00
Cameron Cawley
a4de176e1c Use the correct pixel formats for Vulkan on big endian 2025-12-08 10:07:31 -08:00
Sam Lantinga
9b36a76ee6 Fixed supported pixel formats on big endian systems (thanks @ccawley2011!) 2025-12-08 08:36:32 -08:00
Ethan Lee
96b5c92780 render: D3D12 Xbox does not have COMPARISON_FUNC_NONE yet 2025-12-06 16:10:35 -05:00
Sam Lantinga
09304831f6 Fixed issues with YUV texture updates in the 2D renderer 2025-12-05 08:30:52 -08:00
Sam Lantinga
c61497b744 Account for indexed formats when matching texture formats
Fixes https://github.com/libsdl-org/SDL/issues/14569
2025-12-03 21:21:52 -08:00
Sam Lantinga
f92435cdb9 Vulkan windows get the Vulkan GPU backend in the gpu renderer by default 2025-12-02 07:29:33 -08:00
Sam Lantinga
c0a2ae2a4a opengles2: fixed swapped colors when using indexed textures 2025-11-23 11:38:35 -08:00
Sam Lantinga
0ae3d7b0b0 Fixed crash in the vulkan renderer when the window is minimized
There's more work to do here in other cases where we can't recreate the swap chain, but this fixes the common minimize case.

Fixes https://github.com/libsdl-org/SDL/issues/14434
2025-11-14 12:35:33 -08:00
Sam Lantinga
5bed8ec603 Implemented render batching for D3D9 2025-11-11 08:31:37 -08:00