Sam Lantinga
8afba41aef
Added support for HDR10 video on Apple platforms
2024-02-06 15:40:47 -08:00
Sam Lantinga
2039c46d2c
Added support for creating an SDL texture from a CVPixelBufferRef
2024-02-06 15:40:47 -08:00
Sam Lantinga
c79462dc50
Fixed Xcode build warnings
2024-02-06 12:29:44 -08:00
Sam Lantinga
ba074acad4
Implemented scRGB colorspace and HDR support on macOS
2024-02-06 12:29:44 -08:00
Sam Lantinga
30e176d6ba
Added HDR display properties and related event
...
Also added an HDR calibration stage to testcolorspace
2024-02-06 02:48:05 -08:00
Sam Lantinga
d4caef5b89
Generalize SDR white level handling into a color scale
...
This gives applications better control over how and when light levels are adjusted when working with HDR content and display.
2024-02-06 02:48:05 -08:00
meyraud705
82d89ff4fb
Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo()
2024-02-06 01:55:47 -08:00
Sam Lantinga
b05ea8e04e
Updated direct3d12 renderer with HDR10 and SDR whitelevel support
2024-02-05 13:17:10 -08:00
Sam Lantinga
c3e4481d56
Use a reasonable default for unspecified YUV colorspace
2024-02-05 11:47:17 -08:00
Sam Lantinga
240158f3e8
Scale SDR content to SDR whitelevel when HDR is enabled
2024-02-05 11:47:17 -08:00
Sam Lantinga
e97b2061b4
Converted shader headers to UNIX line endings
2024-02-05 11:47:17 -08:00
Sam Lantinga
e98e5abd2a
Added batch file to create D3D12 shaders
2024-02-05 11:47:17 -08:00
Sam Lantinga
809f02e89e
SDL_ReadSurfacePixel() now supports large pixel formats
2024-02-05 11:47:17 -08:00
Sam Lantinga
9755e490c0
Workaround for crash at shutdown in testffmpeg
...
I'm not sure if this is something in SDL crashing or something in ffmpeg, but it's safer to leave the D3D DLLs loaded.
2024-02-05 09:45:39 -08:00
Sam Lantinga
e74171b1ae
Added support for HDR10 video playback on direct3d11
...
Fixes https://github.com/libsdl-org/SDL/issues/8053
2024-02-05 09:45:39 -08:00
meyraud705
f85535b4b6
Use functions from SDL instead of libc
2024-02-05 09:01:28 -05:00
Sam Lantinga
548b382fd9
Fixed slow startup time when using the direct3d12 renderer
...
On some systems creating the entire set of available pipeline states is very time consuming. We'll only use a few of them in any given program, so we'll just create them on demand.
Fixes https://github.com/libsdl-org/SDL/issues/7634
2024-02-04 13:09:40 -08:00
Sam Lantinga
dab77fe29b
Added support for SDL_COLORSPACE_BT709_FULL to the hardware renderers
2024-02-04 13:09:40 -08:00
Omar Rashwan
67bbf20add
Null check SDL_DBusContext pointer
2024-02-03 14:04:46 -08:00
Sam Lantinga
2ad4646a24
Don't release currentOffscreenRenderTargetView, we don't have a reference to it
2024-02-03 12:49:53 -08:00
Sam Lantinga
9005512c18
Fixed build
2024-02-03 12:39:52 -08:00
Sam Lantinga
7271a2040b
Don't force on the D3D11 debug flag
2024-02-03 12:39:11 -08:00
Sam Lantinga
b4d0af9cf3
Removed unused variables
2024-02-03 12:39:11 -08:00
Sam Lantinga
200f87ea0b
Only set the colorspace if it's not the default
...
This avoids property hash table allocation in most cases
2024-02-03 12:00:55 -08:00
Sam Lantinga
cb811ba463
Fixed warning C4366: The result of the unary '&' operator may be unaligned
2024-02-03 11:49:15 -08:00
Sam Lantinga
62221b3003
Fixed warning C4245: 'return': conversion from 'int' to 'SDL_TimerID', signed/unsigned mismatch
2024-02-03 11:49:15 -08:00
Sam Lantinga
4514aabb41
Fixed warning C4245: 'return': conversion from 'int' to 'Uint64', signed/unsigned mismatch
2024-02-03 11:49:15 -08:00
Sam Lantinga
f107393ed5
Fixed warning C4245: 'return': conversion from 'int' to 'unsigned int', signed/unsigned mismatch
2024-02-03 11:49:15 -08:00
Sam Lantinga
c3e821fa80
Optimized SDL_DuplicatePixels()
2024-02-03 11:49:15 -08:00
Sam Lantinga
89b9d6cbdc
SDL_RenderReadPixels() now returns a surface
...
Fixes https://github.com/libsdl-org/SDL/issues/8977
2024-02-03 11:49:15 -08:00
Sam Lantinga
50a805cdd1
Use YUV colorspaces instead of a global YUV conversion mode
...
Fixes https://github.com/libsdl-org/SDL/issues/8669
2024-02-03 07:36:18 -08:00
Wohlstand
9e76f23561
SDL_windowsopengl.c: WGL: Fixed null-pointer dereference crash
...
Fixes #8968
Fixed crash after 594a79c2f9
(cherry picked from commit a29f37c14a )
2024-02-03 06:19:41 -08:00
Joshua Root
e0158f68e4
Fix SDL_mfijoystick build issues
...
Add missing guards around use of physicalInputProfile.
Add explicit import of Foundation which seems to be needed on some
systems to get the NSArray definition.
Add __unsafe_unretained to ObjC types in struct so the compiler doesn't
complain about that not being allowed with ARC.
Closes : #8979
2024-02-02 22:24:50 -08:00
Sam Lantinga
e67e0c5d55
vulkan_metal.h: Make compatible with ObjC ARC (thanks @jmroot!)
...
(re)Fixes #6598
We need to remember to apply this again once we update from upstream headers.
2024-02-02 18:29:59 -08:00
Sam Lantinga
ba86d9f235
When changing surface format, use the default colorspace for the new format
2024-02-02 17:56:33 -08:00
Sam Lantinga
5d48f9a63a
Added SDL_CopyProperties()
2024-02-02 15:09:12 -08:00
Sam Lantinga
aa8f609ff3
Clamp HDR colors to the SDR range for SDR renderers
2024-02-02 13:13:53 -08:00
Sam Lantinga
9591b2cfb4
Finalized the SDL render API colorspaces
...
The renderer will always use the sRGB colorspace for drawing, and will default to the sRGB output colorspace. If you want blending in linear space and HDR support, you can select the scRGB output colorspace, which is supported by the direct3d11 and direct3d12
2024-02-02 13:13:53 -08:00
Sam Lantinga
f6f9468d84
Fixed warning C4701: potentially uninitialized local variable 'srcpixel' used
2024-02-01 21:24:11 -08:00
Sam Lantinga
d383299779
Fixed build on older Windows SDK
2024-02-01 20:48:53 -08:00
Sam Lantinga
d04fea8b87
Even more miscellaneous gamepad buttons!
2024-02-01 20:34:05 -08:00
Sam Lantinga
cb70e972e3
Added miscellaneous gamepad buttons for additional macro buttons on some controllers
2024-02-01 20:15:01 -08:00
Sam Lantinga
dc607c666b
Fixed creating HDR textures with SDL_CreateTexture()
2024-02-01 15:36:49 -08:00
Sam Lantinga
7561116873
Added support for floating point texture formats
2024-02-01 12:17:35 -08:00
Sam Lantinga
90597aeaef
HDR10 colorspace isn't currently supported
...
You can't do blending directly in PQ space, which means you have to create a scene render target in linear space and use shaders to convert PQ texture data to linear, etc. All of this is out of scope for the SDL 2D renderer at the moment.
2024-02-01 12:17:35 -08:00
Sam Lantinga
19dde63e7c
Added a simple linear scale for tonemapped HDR to SDR surface conversion
2024-02-01 12:17:35 -08:00
Sam Lantinga
fc35b7e121
Convert to sRGB if trying to create a texture from an HDR surface
2024-02-01 12:17:35 -08:00
Sam Lantinga
c1f3c81003
Make the color primary conversion code reusable
...
Also added conversion from rec709 to rec2020 primaries
2024-02-01 12:17:35 -08:00
Sam Lantinga
dd28ab0489
Added SDL_SetRenderDrawColorspace() and SDL_GetRenderDrawColorspace()
2024-02-01 12:17:35 -08:00
Sam Lantinga
9c8b47b726
Cache the draw color state in the software and PSP renderers
...
Converting the color from float is a bit expensive, so let's cache that state
2024-02-01 12:17:35 -08:00