Commit Graph

20 Commits

Author SHA1 Message Date
Cameron Gutman 6e231778a2 Fix blocking during rendering rather than in waitToRender() on MoltenVK
MoltenVK does a lazy fetch of the drawable only when it's being modified, so waitToRender() is completely ineffective as is. Rendering a small empty overlay in waitToRender() forces the next drawable wait to happen in waitToRender(), before we pick the current frame to render. This removes one display refresh period of latency when using V-sync.
2026-06-25 20:01:29 -05:00
Cameron Gutman d997a0d0c8 Dynamically adjust libplacebo swapchain depth on macOS
Direct-to-display mode on some Macs (M4 Mac Mini) can retain our drawables, which cuts the frame rate in half if we're in double-buffered mode.

We don't want to use triple-buffered mode all the time because it increases latency when used if not required, so detect delayed presentation and enable it on the fly if needed.
2026-06-23 21:09:20 -05:00
Cameron Gutman 8c6b422040 Implement libplacebo on MoltenVK 2026-06-14 15:45:38 -05:00
Cameron Gutman ec75f0d8de Refactor libplacebo renderer to handle non-Vulkan hwcontexts 2026-06-14 12:20:54 -05:00
Cameron Gutman d501a627f0 Test all renderers before use
Every renderer except SDL had opted-in for testing due to various
quirks discovered over the years, so just do away with this option
and test all renderers.
2025-12-22 23:58:26 -06:00
Cameron Gutman 351aaa6759 Add an enum type for each renderer 2025-02-18 18:58:04 -06:00
Cameron Gutman 6ce02616f0 Use new Vulkan queue API in FFmpeg 7.1 2024-09-29 23:04:23 -05:00
ns6089 da0244c538 Support YUV 4:4:4 formats 2024-07-24 20:54:13 -05:00
Cameron Gutman 9e92c07cb7 Use VK_NULL_HANDLE instead of nullptr to initialize VkSurfaceKHR field
Fixes #1367
2024-07-24 20:38:36 -05:00
Cameron Gutman b5b2731d5f Add support for rendering software decoded frames with Vulkan 2024-07-06 16:49:35 -05:00
Cameron Gutman 17af71fe7a Allow the Vulkan renderer to accept HDR input even without HDR output capability
In addition to resolving issues with mixing HDR and SDR displays and moving
between them while streaming, it also allows streaming HDR content to an SDR
display with tone mapping handled transparently by libplacebo.
2024-06-09 15:00:56 -05:00
Dylan Frankcom 58e27875ae Fix Raised Black Levels on Steam Deck OLED (#1265)
Add getDecoderColorRange to plvk
2024-04-30 20:31:00 -05:00
Cameron Gutman 2d15382e31 Fix libplacebo renderer build on Windows 2023-12-21 18:12:19 -06:00
Cameron Gutman 2a05b890d8 Enable transparent resizing and display changes for supported renderers 2023-12-17 21:15:40 -06:00
Cameron Gutman 058739321c Move vkAcquireNextImageKHR() into waitToRender() so it can overlap with new frame arrival 2023-12-17 16:47:38 -06:00
Cameron Gutman 708bec2937 Rewrite Vulkan device selection logic to handle multi-GPU systems better 2023-12-17 15:46:10 -06:00
Cameron Gutman c939537c5c Synchronize swapchain and pl_frame colorspace values 2023-12-16 17:36:02 -06:00
Cameron Gutman 8aeb976128 Require a test frame for Vulkan video decoding 2023-12-14 17:44:58 -06:00
Cameron Gutman 7d51a4b67d Fix incorrect overlay colors in Vulkan renderer 2023-12-14 17:43:54 -06:00
Cameron Gutman aac5ad3fd0 Add a libplacebo-based Vulkan renderer for HDR and Vulkan video decoding support
Vulkan H.264/HEVC video decoding isn't supported with Fedora's Mesa binaries due to
patent issues, so only the VAAPI/DRM-PRIME import path was tested locally with ANV.

HDR video is getting tonemapped to my SDR monitor reasonably, so HDR output probably
works with GameScope but I haven't confirmed yet.

See #1117
2023-12-12 23:54:23 -06:00