Commit Graph

1263 Commits

Author SHA1 Message Date
Anonymous Maarten db31367999 testffmpeg: use SDL_free instead of free 2024-03-15 21:26:40 +01:00
Anonymous Maarten f8c2ec5462 testffmpeg: use Uint64 instead of __u64 2024-03-15 21:26:40 +01:00
Ryan C. Gordon 5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
Ryan C. Gordon fc7afa9cbf
rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols. 2024-03-14 19:38:12 -04:00
Ryan C. Gordon 7d4d8ccde0
rwops: Rename everything from SDL_RWxxx to SDL_XxxRW. 2024-03-14 19:37:04 -04:00
Ryan C. Gordon 655ceb3b31
rwops: Renamed SDL_CreateRW and SDL_DestroyRW to SDL_OpenRW and SDL_CloseRW. 2024-03-14 19:37:01 -04:00
Ryan C. Gordon 525919b315
rwops: Reworked RWops for SDL3.
- SDL_RWops is now an opaque struct.
- SDL_AllocRW is gone. If an app is creating a custom RWops, they pass the
  function pointers to SDL_CreateRW(), which are stored internally.
- SDL_RWclose is gone, there is only SDL_DestroyRW(), which calls the
  implementation's `->close` method before freeing other things.
- There is only one path to create and use RWops now, so we don't have to
  worry about whether `->close` will call SDL_DestroyRW, or if this will
  risk any Properties not being released, etc.
- SDL_RWFrom* still works as expected, for getting a RWops without having
  to supply your own implementation. Objects from these functions are also
  destroyed with SDL_DestroyRW.
- Lots of other cleanup and SDL3ization of the library code.
2024-03-14 19:36:08 -04:00
Semphris 70c2e15615 Add file dialogs 2024-03-14 15:40:25 -07:00
Sam Lantinga 209a87bf24 Added missing default case (thanks @sezero!) 2024-03-14 08:52:59 -07:00
Sam Lantinga 41b7036f37 testffmpeg: added support for EGL OES frame formats 2024-03-12 16:13:04 -07:00
Sam Lantinga d78a24a5ce testffmpeg: added verbose logging of ffmpeg messages 2024-03-11 15:48:52 -07:00
Sam Lantinga 7c5f79e7ea testffmpeg: removed redundant enumeration of hardware device types 2024-03-11 15:31:47 -07:00
Anonymous Maarten bee8a95571 Fix SDL_LEAN_AND_MEAN build 2024-03-11 13:46:16 -07:00
Sam Lantinga efbbafb3f1 Re-added balls to the SDL joystick API
It turns out these were being used on Linux and at least one virtual driver was making use of them (thanks @mrfixit2001!)
2024-03-10 21:30:14 -07:00
Nour Fouad b6c5ad0075 Update hardcoded value of pi to use SDL constant SDL_PI_F for improved consistency and readability. 2024-03-08 20:49:01 -08:00
Sam Lantinga fcb132b8e8 Allow building testffmpeg without Vulkan support 2024-03-08 16:45:27 -08:00
Ozkan Sezer d86ff6c6c0 remove stale / wrong information from SDL_RWread() documentation 2024-03-08 18:55:40 +03:00
Sam Lantinga e9ab2d46de Revert "Change `SDL_Keycode` type to an enum"
SDL_Keycode can actually be any printable character on the keyboard, so isn't limited to the enumerated values of SDL_KeyCode.
2024-03-07 06:58:43 -08:00
Sam Lantinga 33eaddc565 Cleaned up various type conversion issues
This makes sure SDL_PixelFormatEnum flows through the internal code correctly, as well as fixing a number of other minor issues.
2024-03-07 06:58:43 -08:00
Susko3 01248a99c8 Add `default: break;` to switches on SDL_Event::type
This is just a nice-to-have, as `SDL_Event::type` in an `Uint32`, so there are no
compiler errors about not handling all `SDL_EventType` enum values.
2024-03-06 15:40:05 -08:00
Susko3 641b911d38 Update some internal files to use `SDL_WindowFlags` 2024-03-06 15:08:12 -08:00
Susko3 424616e032 Use SDL_PixelFormatEnum as type 2024-03-06 15:02:13 -08:00
Susko3 f8cb3c742d Change `SDL_Keycode` type to an enum 2024-03-06 12:17:53 -08:00
Sam Lantinga c07b39fa06 Fixed build 2024-03-06 09:57:39 -08:00
Sam Lantinga 860155680d SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events. 2024-03-06 09:51:15 -08:00
Sam Lantinga 9db68f97f9 Reverted SDL_Vulkan_GetInstanceExtensions() API change
This function is commonly used with Vulkan structures that use uint32_t, so we should keep the Uint32 signature.
2024-03-05 13:39:42 -08:00
Sylvain cea717e5d3 Removed some uneeded 'unsigned': renderer.num_texture_format and SDL_Vulkan_GetInstanceExtensions() prototype 2024-03-05 13:31:28 -08:00
Sam Lantinga d4f4aa745a Use C++ style comments in new code 2024-03-05 04:46:37 -08:00
Sam Lantinga fb87f8f15c testffmpeg: fixed mismatch between frame size and frame texture size
The AVHWFramesContext associated with the frame has the texture size, and the frame width and height are the displayed size and can be smaller than the texture size
2024-03-04 11:17:42 -08:00
Sam Lantinga 180dd0bb39 testffmpeg: don't free the instance extensions, we hold onto them in the context 2024-03-04 11:17:42 -08:00
Sam Lantinga 2d4105ba8b testffmpeg: only enable AV_PIX_FMT_VULKAN if we have a Vulkan renderer 2024-03-04 11:17:42 -08:00
Sam Lantinga 97f97109d1 testffmpeg: fixed Vulkan validation errors
The semaphores need to be submitted in order
2024-03-04 09:29:36 -08:00
Sam Lantinga dbec2150d0 testffmpeg: added support for Vulkan rendering 2024-03-04 09:29:36 -08:00
Robert Edmonds a4d7ff6751 testffmpeg: Use EGL_EXT_image_dma_buf_import_modifiers extension
If the `EGL_EXT_image_dma_buf_import_modifiers` extension is available, propagate the DRM format modifier from the AVDRMObjectDescriptor to eglCreateImage() on Linux. Some hardware will decode video into a non-linear DRM surface, and passing the DRM format modifier to eglCreateImage() is required in order to display something useful.

Fixes https://github.com/libsdl-org/SDL/issues/9075
2024-03-03 15:18:56 -08:00
Sam Lantinga 88dcf74588 testyuv: we no longer need to override the HDR headroom for the BT.2020 test 2024-03-02 15:06:28 -08:00
Sam Lantinga 7f9ff6277c Don't assume HDR headroom for HDR10 surfaces
Applications that support HDR will set the correct values for their content.
2024-03-02 15:02:17 -08:00
Sam Lantinga f2cd361e25 testyuv: added validation of P010 YUV format
Also added conversion between RGB and P010, using XRGB2101010 as a bridging format in PQ space
2024-03-01 20:26:52 -08:00
Sam Lantinga 47be24d225 testyuv: added --monochrome and --luminance options for interactive mode 2024-03-01 07:42:34 -08:00
Sam Lantinga 991ad27de8 testyuv: added GetColorspaceForYUVConversionMode() 2024-03-01 07:42:34 -08:00
Ryan C. Gordon 1e8b006d43 stdlib: qsort and bsearch changes.
- Always use internal qsort and bsearch implementation.
- add "_r" reentrant versions.

The reasons for always using the internal versions is that the C runtime
versions' callbacks are not mark STDCALL, so we would have add bridge
functions for them anyhow, The C runtime qsort_r/qsort_s have different
orders of arguments on different platforms, and most importantly: qsort()
isn't a stable sort, and isn't guaranteed to give the same ordering for
two objects marked as equal by the callback...as such, Visual Studio and
glibc can give different sort results for the same data set...in this
sense, having one piece of code shared on all platforms makes sense here,
for reliabillity.

bsearch does not have a standard _r version at all, and suffers from the
same SDLCALL concern. Since the code is simple and we would have to work
around the C runtime, it's easier to just go with the built-in function
and remove all the CMake C runtime tests.

Fixes #9159.
2024-03-01 08:28:12 -05:00
Sam Lantinga 039144350c Be more precise about what we're testing in testyuv 2024-02-28 17:15:47 -08:00
Sam Lantinga b30ba1c5d4 Updated RGBtoYUV() to use the full YCbCr conversion formula 2024-02-28 16:58:39 -08:00
Sam Lantinga 353e76b40b Use the correct colorspace for yuv conversion tests 2024-02-28 10:03:18 -08:00
Sam Lantinga fb3bf1dcbd Fixed device queue initialization when render and present queue families are different 2024-02-28 08:55:56 -08:00
Anonymous Maarten 0a961915dc cmake: testffmpeg requires link to EGL library for EGL feature 2024-02-27 12:28:06 +01:00
Sam Lantinga 24e021c67e testffmpeg: refactored texture creation properties into a single function 2024-02-26 16:01:23 -08:00
Sam Lantinga ff18d7cfa0 testffmpeg: added pixel format mapping for NV12 and NV21 2024-02-26 15:52:21 -08:00
Sam Lantinga f99143f437 Don't quit testffmpeg when alt-tabbing away 2024-02-26 15:21:26 -08:00
Sam Lantinga 3a796c9722 Allow specifying the render driver in the environment for testffmpeg 2024-02-26 15:13:10 -08:00
Sam Lantinga dc9a3c83e2 Use the mastering display metadata to do proper tone mapping for HDR content 2024-02-26 14:20:34 -08:00