Ryan C. Gordon
febe5dd3bc
render: opengl and opengles2 renderers try to disable GL_FRAMEBUFFER_SRGB.
...
Reference Issue #14898 .
(cherry picked from commit fc570a1a1c )
2026-02-16 13:09:18 -05:00
Ryan C. Gordon
9f45801fa7
render: OpenGL and GLES2 should explicitly request a not-sRGB-capable context.
...
Reference Issue #14898 .
(cherry picked from commit 60690ff829 )
2026-02-09 21:44:47 -05:00
Sam Lantinga
badd9e5a15
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
(cherry picked from commit 6feb0e1333 )
2026-02-08 11:56:12 -08:00
Max Seidenstücker
576c2d2f2c
Merge all occurances of __func__ and __FUNCTION__ to SDL_FUNCTION
...
(cherry picked from commit 8f8880a8eb )
2026-02-08 11:56:12 -08:00
Sam Lantinga
12e9ff33c3
Fixed checking against cached shader params (thanks @ccawley2011!)
...
(cherry picked from commit 4de62c35c0 )
2026-02-08 11:00:24 -08:00
Wohlstand
000d56702e
SDL_render_psp.c: Also apply the similar fix to PSP
...
Since this problem is the same here
(cherry picked from commit a36ef1f187 )
2026-02-06 09:08:58 -08:00
Wohlstand
c12d90108f
SDL_render_vita_gxm.c: Fixed the black screen due to zero cliprect
...
(cherry picked from commit 87a81bd09d )
2026-02-06 09:08:57 -08:00
Wohlstand
44c0feed99
Revert "Reverted Vita cliprect changes"
...
This reverts commit aeb4b3d2fc .
(cherry picked from commit 75d1d64c75 )
2026-02-06 09:08:57 -08:00
Cameron Gutman
6c38358984
Fix invalidation of bound textures/shaders across a renderer flush on D3D9
...
(cherry picked from commit 4743f97c39 )
2026-01-31 17:17:44 -08:00
Wouter Wijsman
6cd9374929
Fix PSP_QueueGeometry funcion rendering some textures too small
...
(cherry picked from commit c1e715439a )
2026-01-28 07:39:43 -08:00
Sam Lantinga
a3232fe84e
Set SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN for the GPU renderer
...
(cherry picked from commit a929eb71b3 )
2026-01-25 09:16:01 -08:00
Eddy Jansson
26352be1e5
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 .
(cherry picked from commit 248223592a )
2026-01-23 16:02:27 -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
Sam Lantinga
3ec7fc8f59
SDL_CreateGPURenderState() doesn't modify the createinfo parameter
...
(cherry picked from commit 3f0e0975d8 )
2026-01-17 20:49:04 -08:00
DarkContact
a4b7a77d70
Add support for GPU ARGB1555 (B5G5R5A1_UNORM) textures with DX11
...
(cherry picked from commit 044aed1f27 )
2026-01-07 10:12:46 -08:00
Ethan Lee
406cd277d2
render: Add support for private-platform shaders in GPU backend
2026-01-05 09:49:15 -05:00
Sam Lantinga
80c6a5f8d9
Updated copyright for 2026
2026-01-01 09:48:19 -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
Sam Lantinga
dde7fa3b17
Validate the output colorspace before setting up a renderer
2025-11-10 18:30:02 -08:00
Sam Lantinga
6baaa0fe87
Destroy the window surface if a software renderer couldn't be created
2025-11-10 18:30:02 -08:00
Sam Lantinga
33c70af2f8
Fixed SDL_COLORSPACE_SRGB_LINEAR being used for RGBA32 textures
2025-11-10 18:30:02 -08:00
Sam Lantinga
ead02b08dd
Skip tonemapping for render targets with unspecified HDR headroom
2025-11-10 18:30:02 -08:00
Sam Lantinga
4e5ba722fd
Change the batch if the color scale changes
...
The color scale is a shader constant so it can be applied in linear space
2025-11-10 18:30:02 -08:00
Sam Lantinga
d29f368ca8
Change the batch if the GPU render state changes
2025-11-10 18:30:02 -08:00
Sam Lantinga
3399bc600e
gpu renderer: add color to the point/line vertex data
...
This allows us to batch color changes in a single draw call
2025-11-10 18:30:02 -08:00
Sam Lantinga
97ebfbf7a0
Only convert color to linear once in VULKAN_QueueDrawPoints()
2025-11-10 18:30:02 -08:00
Sam Lantinga
d9be8b9a00
Implemented render batching for D3D11, D3D12, Metal, and Vulkan
...
Fixes https://github.com/libsdl-org/SDL/issues/7534
2025-11-10 18:30:02 -08:00
Sam Lantinga
cc2a272d6f
Enable RLE more often in the software renderer
...
We don't need to aggressively disable RLE acceleration anymore because the original pixels remain available for operations that aren't supported by the RLE blitter.
2025-11-08 14:51:27 -08:00
Sam Lantinga
7553d5892e
Fixed software renderer 8-bit scaling and rotation (thanks @jroatch!)
...
Fixes https://github.com/libsdl-org/SDL/issues/14422
2025-11-08 08:46:58 -08:00
Sam Lantinga
1fb663b429
Make sure that SDL_PIXELFORMAT_ARGB8888 is the first texture format for OpenGL
...
Fixes https://github.com/libsdl-org/SDL/issues/1440
2025-11-07 11:13:50 -08:00
Sam Lantinga
3489a45216
Use srcpixel now that we've set it
2025-11-07 11:12:10 -08:00
Sam Lantinga
294beceec7
Fixed error: 'srcpixel' may be used uninitialized
2025-11-07 11:11:31 -08:00
Sam Lantinga
0f21e46586
Added support for SDL_PIXELFORMAT_INDEX8 to SDL_BlitTriangle_Slow()
...
Fixes https://github.com/libsdl-org/SDL/issues/14419
2025-11-07 11:01:23 -08:00
Sam Lantinga
547b2a2e37
SDL_SetSurfaceRLE() has a boolean parameter
2025-11-07 11:01:23 -08:00
Sam Lantinga
e24eeefbd1
The default render texture format is SDL_PIXELFORMAT_ARGB8888
...
We do this for consistency across backends
2025-11-06 09:46:43 -08:00
Mathieu Eyraud
de5b8a1c45
Remove useless call to SetTextureAddressMode()
2025-11-06 08:25:00 -08:00