Commit Graph

1407 Commits

Author SHA1 Message Date
Cameron Gutman b33a252739 Fix incorrect apply() return value for legacy DRM clients 2026-05-16 16:09:57 -05:00
Cameron Gutman bba2faa602 Fix broken horizontal scroll inversion 2026-05-16 15:45:13 -05:00
Cameron Gutman 87c3179f77 Fix incorrect failure check 2026-05-15 23:23:36 -05:00
Cameron Gutman 8fe279c91b Add support for controllers with dual touchpads 2026-05-14 22:14:50 -05:00
Cameron Gutman dedb0c0327 Disable text input before creating windows 2026-05-14 21:45:22 -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 4cf498b09d Use queued audio duration instead of queued frame count to constrain latency
This avoids latency explosion when we negotiate 10 ms instead of 5 ms audio packets.
2026-05-10 21:53:09 -05:00
Cameron Gutman 9d6218d1ff Don't capture the cursor by default in windowed mode
Closes #1872
2026-05-09 13:11:45 -05:00
Cameron Gutman 5faa5fece8 Don't manually override v4l2m2m buffer counts
This causes POLLERR when decoding from meson-vdec on the Libre
Computer Alta (and likely other Amlogic boards). Our requried buffer
counts were already lower than the default 16/20 configuration that
FFmpeg uses, so overriding them was just a memory usage optimization.
2026-04-20 00:25:21 -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 af03f57e08 Fix Vulkan decoder probing on Nvidia using KMSDRM 2026-04-09 22:11:08 -05:00
Cameron Gutman 1fc1122c65 Consolidate test window creation code 2026-04-09 21:43:35 -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 91ce7a41e5 Cache the result of SDL_GetNumDisplayModes()
It's not free when using SDL2-compat.
2026-03-28 21:57:51 -05:00
Cameron Gutman 53a7680a38 Fix incorrect autoselection of SW AV1 over HW H.264 for SDR content 2026-03-28 20:19:11 -05:00
Cameron Gutman 88b4a17fe1 Use AV_CODEC_RECEIVE_FRAME_FLAG_SYNCHRONOUS for decoder probing on FFmpeg 8.1 2026-03-28 16:30:28 -05:00
Cameron Gutman 8326223220 Revert "Use EOS to force decoder test frame output"
It causes hangs on defective v4l2m2m decoders, and it's not always
well-supported by out-of-tree decoders either.

This reverts commit 66a30c66f3.
2026-03-28 16:24:20 -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 209511b2dc Revert Pinyin IME workaround which is ineffective on SDL3
The underlying SDL bug is now fixed upstream for SDL 3.4.2.
2026-02-16 15:00:30 -06:00
Cameron Gutman 6f4ced5ed6 Assume GPUs on non-x86 platforms are slow by default
This can be overriden with GL_IS_SLOW=0 at runtime
for systems with a fast GPU, though it doesn't make
much difference either way for non-KMSDRM cases.

For slower GPUs, this enables important scaling and
rendering optimizations that can substantially
improve performance (especially on fillrate-limited
GPUs common in SBCs).
2026-02-05 23:17:23 -06: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 a56efe5c36 Fix infinite renderer resets on SDL3 using direct3d renderer 2026-01-30 20:39:53 -06:00
Cameron Gutman b7a05d73b9 Update SDLRenderer capabilities to match SDL3 behavior 2026-01-30 20:38:53 -06:00
Cameron Gutman 6d5b9e4706 Remove Windows dark mode hack since SDL3 supports it natively 2026-01-30 19:57:11 -06:00
Cameron Gutman 792f762c15 Standardize on QString::toUtf8() 2026-01-26 21:49:08 -06:00
Cameron Gutman 8c9c799f81 Fix Clazy non-pod-global-static warnings 2026-01-26 21:49:08 -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