Cameron Gutman
b100e674dd
HACK: Wait longer before rendering a frame
2026-07-12 22:45:07 -05:00
Cameron Gutman
8b18d58aa0
Add workaround for interoperability issue with out-of-tree FFmpeg zero-copy v4l2m2m patches and libplacebo
...
Fixes #1786
2026-07-08 23:40:08 -05:00
Cameron Gutman
c9b03f80f8
Partially revert "Use GL_NEAREST when possible without degrading quality"
...
The changes to GL_NEAREST for overlay textures and disabling alpha blending in SDL renderer are left intact.
This reverts commit 0f49dca4c0 .
2026-07-01 21:56:54 -05:00
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
06bd8a730b
Force sRGB Vulkan swapchain on macOS to fix washed out colors
2026-06-23 19:19:56 -05:00
Cameron Gutman
50364fd522
Don't set VK lock/unlock queue functions past libavutil 62
...
They are scheduled for removal at that ABI bump.
2026-06-21 14:01:47 -05:00
Cameron Gutman
bea5355c66
Fix unused parameter warning on Windows and Linux
2026-06-21 14:01:47 -05:00
Cameron Gutman
a9ad048252
Fix HDR rendering in libplacebo on macOS
2026-06-14 18:58:22 -05:00
Cameron Gutman
51cc5a8537
Remove libplacebo workaround for FFmpeg compiled without Vulkan support
2026-06-14 18:57:46 -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
97240cd5f2
Add workaround for libplacebo crash with Raspbian FFmpeg
...
Fixes #1409
2026-05-24 14:43:02 -05:00
Cameron Gutman
459dcd7b2c
Fix incorrect error print
2026-05-16 16:10:47 -05:00
Cameron Gutman
b33a252739
Fix incorrect apply() return value for legacy DRM clients
2026-05-16 16:09:57 -05:00
Cameron Gutman
87c3179f77
Fix incorrect failure check
2026-05-15 23:23:36 -05:00
Cameron Gutman
9cbba106ad
Use the Metal renderer by default on all Macs
...
Whatever dGPU/eGPU rendering issues existed at the time I wrote that check seem to no longer happen on my RX 480 eGPU test setup running Ventura (our oldest supported OS).
It seems safe enough to enable now, especially since 7d6ce0b4c should catch broken systems and transparently fall back to AVSampleBufferDisplayLayer.
Fixes #1885
2026-05-14 00:45:57 -05:00
Cameron Gutman
7d6ce0b4cc
Implement testRenderFrame() for the VTMetal renderer
...
This can be used to (hopefully) detect cases where importing the decoded frames onto the target GPU fails.
See #1885
2026-05-14 00:34:32 -05:00
Cameron Gutman
51f86caac3
Fix assert on exit using KMSDRM on AMDGPU
...
AMDGPU disallows commits that would leave a CRTC active without
the primary plane enabled. Instead of disabling the primary plane,
simply restore the original state of the plane to avoid this.
2026-04-19 23:17:28 -05:00
Cameron Gutman
5d813ed3df
Fix clamping of signed range properties
2026-04-19 22:17:37 -05:00
Cameron Gutman
0e50a9d457
Only enable D3D11/DXGI debug layer if Graphics Tools are installed
...
Closes #1857
2026-04-13 20:06:24 -05:00
Cameron Gutman
a766c9cafc
Disable texture sharing on Qualcomm GPUs
...
See #1857
2026-04-11 20:14:14 -05:00
Cameron Gutman
94d47e95fe
Fix non-determinism during Vulkan decoder probing on KMSDRM
2026-04-09 21:37:25 -05:00
Cameron Gutman
4ec682dc72
Remove errant assert to fix software decoding on Xe
2026-04-06 21:12:00 -05:00
Cameron Gutman
c8d18f8a8e
Bring back DRM atomic test commit using new DRM master lock
...
The DRM master lock avoids race conditions between Qt taking master
to draw the GUI and the DRM renderer performing a test commit.
2026-04-06 19:25:03 -05:00
Cameron Gutman
9c11dca454
Move DRM master state cleanup into cleanupRenderContext()
2026-04-06 19:24:04 -05:00
Cameron Gutman
5676a076fd
Fix overlay plane selection on drivers without zpos properties
2026-04-01 22:37:12 -05:00
Cameron Gutman
4aa5ad71c0
Use av_vk_get_optional_device_extensions() on FFmpeg 8.1
2026-03-28 16:17:59 -05:00
Cameron Gutman
8795fb54f4
Fix double-free in Vulkan renderer when an overlay is disabled
...
Also a drive-by fix to avoid pl_tex copying
2026-02-04 23:05:01 -06:00
Cameron Gutman
5020fc6f48
Do not reset the renderer on SDL_RENDER_TARGETS_RESET
...
We only need to do this on a SDL_RENDER_DEVICE_RESET where we lose the whole device.
This also reverts a56efe5 since this change is not needed when handling the reset events properly.
2026-01-31 13:00:23 -06:00
Cameron Gutman
a2122e17c6
Explicitly request linear sampling in StretchRect()
2026-01-31 12:48:03 -06:00
Cameron Gutman
6bb7c8bf2a
Fix blurriness of DXVA2 overlay
...
Also make a drive-by fix for D3DTSS_COLOROP since we don't use vertex colors.
2026-01-31 12:44:50 -06:00
Cameron Gutman
2dda65078f
Remove D3D9Ex focus loss hint workaround
...
SDL3 doesn't suffer this bug and keeping the default SDL3 auto behavior (minimize iff in exclusive mode) is a better UX.
2026-01-30 21:07:01 -06:00
Cameron Gutman
b7a05d73b9
Update SDLRenderer capabilities to match SDL3 behavior
2026-01-30 20:38:53 -06:00
Cameron Gutman
d484ec3ac8
Fix Clazy range-loop-detach warnings
2026-01-26 21:49:08 -06:00
Cameron Gutman
f5f06ae44e
Remove handling for Windows versions that are no longer supported
2026-01-26 20:04:15 -06:00
Cameron Gutman
cd9aceb62c
Disable D3D11VA texture sharing on known broken GPUs
2026-01-26 19:37:43 -06:00
Cameron Gutman
e4be57db5d
Remove superfluous Session checks in prepareToRender()
...
prepareToRender() is only called with a live Session.
2026-01-26 18:17:14 -06:00
Cameron Gutman
64fea80ac9
Create the SystemProperties test window on the main thread
2026-01-25 17:10:04 -06:00
Cameron Gutman
1e825c85e5
Optimize render to decode fence usage to reduce pipeline bubbles
2026-01-19 18:38:38 -06:00
Cameron Gutman
a0a4c1ea83
Use decoder texture binding by default when using separate devices
...
This significantly improves performance on Ryzen 3300U and should generally perform equal or better everywhere.
This decoder->SRV path has been prone to driver bugs, so we may need to adjust this logic if driver issues crop up.
2026-01-19 16:46:50 -06:00
Cameron Gutman
b5e7dec378
Fix D2R fence initial value
...
Fixes synchronization of the first decoded frame
2026-01-19 16:10:02 -06:00
Cameron Gutman
adbd19e6fa
Remove the previous frame rendered fence
...
- Waiting on this fence prior to rendering introduces pipeline bubbles which can impact rendering performance on low-end GPUs
- Pacer simply waiting to release the previous frame until after the current frame is rendered already means any decoder stall should be very short
2026-01-19 16:01:50 -06:00
Cameron Gutman
02a86167da
Disable separate decoder devices for non-Intel FL11.0 GPUs
2026-01-19 15:08:14 -06:00
Cameron Gutman
a739c1cef8
Fix D3D11 fence sharing without monitored fence support
2026-01-19 14:53:23 -06:00
Cameron Gutman
f6e08f8a43
Use separate render and decode D3D11Devices
...
See #1424
2026-01-19 14:25:08 -06:00
Cameron Gutman
218ffc2d55
Set explicit scaling mode for all SDL textures
2026-01-17 02:34:54 -06:00
Cameron Gutman
0f49dca4c0
Use GL_NEAREST when possible without degrading quality
2026-01-17 02:23:28 -06:00
Cameron Gutman
30274f3ae8
Don't keep the dummy renderer alive for EGLRenderer's lifetime
...
At best, it doesn't do anything other than some queue some viewport
changes via SDL_RendererEventWatch(). At worst, it can race with
the render thread and cause trouble.
2026-01-17 01:06:41 -06:00
Cameron Gutman
198a208b44
Clamp property values when restoring them
2026-01-14 23:26:46 -06:00