Cameron Gutman
e89f63b8fb
Skip unnecessary glClear() on X11
2025-12-29 16:50:15 -06:00
Cameron Gutman
93dc6d6b60
Convert Metal shaders to FP16
2025-12-29 01:45:49 -06:00
Cameron Gutman
8ee82421b3
Remove non-compliant float suffix in NV12 fragment shader
...
The 'f' suffix isn't supported until ESSL 3.0.
2025-12-28 22:58:21 -06:00
Cameron Gutman
31c65e0863
Optimize EGLRenderer overlay texture swizzle
2025-12-28 22:57:59 -06:00
Cameron Gutman
3e5aa9b127
Simplify EGLImageFactory and remove caching logic for now
...
The platforms that would most benefit (embedded V4L2 decoders)
either don't use frame pooling or don't synchronize with
modified DMA-BUFs unless eglCreateImage() is called each time.
2025-12-28 17:54:31 -06:00
Cameron Gutman
085480e9f4
Add EGLImage caching to improve performance
2025-12-28 17:08:45 -06:00
Cameron Gutman
c3ce0918b3
Optimize blending in DXVA2 and D3D11VA renderers
2025-12-28 13:53:13 -06:00
Cameron Gutman
c5b7a9c679
Optimize EGLRenderer with overlay VAOs and reduced GL_BLEND usage
2025-12-28 13:14:16 -06:00
Cameron Gutman
f1451a0db3
Fix UB due to missing shader attribute location binding
...
Mesa drivers seem to generally bind attributes in order, but the
proprietary PowerVR driver (pvr) doesn't and renders incorrectly
as a result.
2025-12-27 23:56:17 -06:00
Cameron Gutman
8a5f34fb01
Remove logic to force the OpenGL ES library to load
...
This isn't necessary now that we turn on EGL everywhere,
and it breaks OpenGL ES 2.0 support too.
2025-12-27 23:11:53 -06:00
Cameron Gutman
d1f43ca258
Use ESSL 1.0 for EGLRenderer shaders
...
We still ostensibly support GLES 2.0 GPUs.
2025-12-27 22:56:20 -06:00
Cameron Gutman
249c29b74c
Allow GL_IS_SLOW and VULKAN_IS_SLOW to be overridden at runtime
2025-12-27 21:40:32 -06:00
Cameron Gutman
1cf207de07
Allow overriding FFmpeg AVOptions via environment variable
2025-12-27 21:07:04 -06:00
Cameron Gutman
4f08d52754
Enable DRM_PRIME frames for the TH1520
2025-12-27 15:40:59 -06:00
Cameron Gutman
41ad3c0938
Add environment variable override helper function
...
This allows FORCE_QT_GLES and SEPARATE_TEST_DECODER to override both true and false.
2025-12-27 15:33:39 -06:00
Cameron Gutman
21fb2832e1
Fix CLI exit after unexpected stream termination
...
Fixes #939
2025-12-27 13:33:46 -06:00
Cameron Gutman
b80d2a00c0
Fix SIGTERM unexpectedly quitting the host app
2025-12-23 01:09:21 -06:00
Cameron Gutman
85ea28287e
Add workaround for AV1 reinit bug and quiet some debug output
2025-12-23 00:59:19 -06:00
Cameron Gutman
a6f8901a18
Reuse the test decoder to improve startup performance
2025-12-23 00:32:36 -06: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
526d815930
Don't fall back to the generic hwaccel for DRM_PRIME formats
2025-12-22 15:06:20 -06:00
Cameron Gutman
b448e5bbd7
Update AppImage dependencies
2025-12-22 10:54:50 -06:00
Cameron Gutman
741e360024
Fix GLES compatibility check on VF2 pvr driver
2025-12-21 22:15:29 -06:00
Cameron Gutman
7edbede95d
Force Qt to use GLES if desktop GL is not available
...
Some platforms like the VisionFive 2 don't have working desktop GL,
so they must use GLES to be able to render at all. Qt doesn't try
to fall back if it fails to find a compatible EGL config, so we must
do so ourselves.
2025-12-21 21:13:22 -06:00
Cameron Gutman
7f54662160
Autoselect AV1 over H.264 on RK3588
2025-12-21 14:59:08 -06:00
Cameron Gutman
f66285ddba
Fix spurious HEVC software decode warning if AV1 is forced without HEVC hardware decoding
2025-12-21 14:36:22 -06:00
Cameron Gutman
bdfadb1cdc
Let the streaming session handle exiting on SIGTERM
2025-12-14 19:11:13 -06:00
Cameron Gutman
63a381a882
Fix macOS build
2025-12-14 19:07:50 -06:00
Cameron Gutman
4a591069ac
Add custom signal handlers to arbitrate between Qt and SDL
...
Fixes #1496
2025-12-14 18:57:26 -06:00
Cameron Gutman
c71b513bc4
Pump the Qt event loop before creating the SDL window
2025-12-14 18:09:20 -06:00
Cameron Gutman
700655c051
Remove the fixed delay for starting the connection
...
The StreamSegue already handles delaying to allow the warnings to be visible.
2025-12-14 17:57:20 -06:00
Cameron Gutman
3425fec33d
Use EGL+GLES workaround for Nvidia X11
...
We can avoid disabling EGL entirely by forcing Qt to use GLES,
which is not impacted by the black window issue. This lets us
simplify back to EGL everywhere.
2025-12-14 16:21:32 -06:00
Cameron Gutman
de844f2a0c
Deprioritize the Nvidia VAAPI driver if Vulkan or CUDA are available
2025-12-11 20:13:14 -06:00
Cameron Gutman
54163e30d0
Disable EGL on Nvidia XWayland environments too
...
It renders a black window, just like native X11.
2025-12-11 20:13:14 -06:00
Cameron Gutman
bd6a1d9a9b
Replace NVDEC with Vulkan Video in Flatpak metadata
...
NVDEC has been disabled by default since e6e91ca8
2025-12-10 21:54:07 -06:00
Cameron Gutman
b25801ff7d
Update VCRedist
2025-12-10 21:47:31 -06:00
Cameron Gutman
bc5e9917cd
Fix PS script for compatibility with KB5074596
2025-12-10 21:46:44 -06:00
Cameron Gutman
d8eb817ed9
Rerun lupdate and lrelease
2025-12-09 00:47:21 -06:00
Cameron Gutman
c1e5b0bf66
Merge remote-tracking branch 'origin/weblate'
2025-12-09 00:45:35 -06:00
Cameron Gutman
26f96a20a9
Fix implicit fall-through warnings
2025-12-07 18:58:25 -06:00
Cameron Gutman
dbcc6a9089
Improve initialization performance when using Vulkan Video decoding
2025-12-07 17:57:22 -06:00
Cameron Gutman
9c6d2bab19
Use EGL_VENDOR instead of NV-CONTROL for Nvidia detection
...
The latter will still match on a hybrid system when the iGPU's EGL
implementation is in use. This scenario works properly with EGL
rendering in Qt and SDL, so we want to allow that.
2025-12-06 11:20:03 -06:00
Cameron Gutman
c92dc2495e
Don't use vaPutSurface() if there are no valid subpicture formats
2025-12-05 23:52:41 -06:00
Cameron Gutman
1c24aada0a
Never use X11 EGL on Nvidia proprietary drivers
...
Fixes #1751
2025-12-05 23:10:31 -06:00
Cameron Gutman
58f9b2a83b
Use opaque black in ClearRenderTargetView()
...
Intel's old Gen9 performance guide says it's a little faster.
2025-12-01 22:39:28 -06:00
Cameron Gutman
5feb331c46
Improve QT_QPA_EGLFS_KMS_CONFIG temporary file handling
...
- Close it before handing it to the QPA plugin to read
- Put the temporary file in TMPDIR instead of the current directory
2025-12-01 00:36:59 -06:00
Cameron Gutman
9d5f25f828
Don't use separate threads for querying SDL video info
...
This is no longer necessary now that we force Qt and SDL to use EGL.
2025-11-30 23:18:38 -06:00
Cameron Gutman
d3c23b55dc
Disable the VAAPI RFI latency workaround by default
...
I can no longer reproduce this issue on the same system running
Ubuntu 24.04 with the core22-based edge channel snap anymore.
2025-11-30 22:23:09 -06:00
Cameron Gutman
80b7a69cd2
Revert "Use the default Qt render loop"
...
This seems to cause 10+ second hangs at the StreamSegue spinner
when using the Qt5-based Snap on Ubuntu 24.04's Wayland session.
It's unclear if this is still an issue on Qt 6, but let's be
conservative and just revert it for now.
This reverts commit f57257cbfd .
2025-11-30 22:00:33 -06:00
Cameron Gutman
42bf87753f
Remove the installer check for MpsSvc
...
The firewall custom action has ignored failures since a6e549471c , so this pre-check is no longer necessary.
Fixes #1736
2025-11-26 21:06:06 -06:00
Cameron Gutman
d262e5d1f6
Recompile D3D11 shaders for Shader Model 5.0
...
We already require FL 11.0+ GPUs anyway, so compiling them for an older shader model didn't provide any benefit.
2025-11-24 19:02:20 -06:00
Cameron Gutman
f0821d9543
Use D3D11_COPY_DISCARD when updating our video texture
...
This ensures the driver knows it doesn't have to synchronize with the previous texture data.
2025-11-24 18:49:19 -06:00
Cameron Gutman
4164a222ae
Consolidate D3D11 constant buffers now that all shaders need a CSC constant buffer
2025-11-24 18:47:14 -06:00
Cameron Gutman
245cd7f1a8
Don't trim the alignment padding with CopySubresourceRegion()
...
The shader already handles trimming for the bound output texture case.
2025-11-24 01:44:51 -06:00
Cameron Gutman
62816a6b2a
Prioritize AV1 over H.264 if HEVC is unavailable on Windows
...
Some Windows PCs are shipping with HEVC disabled in firmware, even though they support AV1.
2025-11-24 00:06:40 -06:00
Cameron Gutman
f5ef201905
Create a separate X11 Display object for libva
...
Sharing these directly is fraught with concurrency issues that
require extreme care on both sides to avoid spurious X11 errors,
hangs, and other nasty stuff. We can't necessarily depend on SDL,
libva, or the underlying VA drivers to do the right thing here.
Using a new Display (as FFmpeg does for VAAPI and VDPAU) avoids
all these problems.
2025-11-23 13:26:46 -06:00
Cameron Gutman
01288be937
Use the same X display name for VDPAU that SDL is using
2025-11-23 13:20:36 -06:00
Cameron Gutman
f57257cbfd
Use the default Qt render loop
...
Since we stopped pumping the event loop manually and switched to EGL
on X11, the default threaded render loop seems to work fine now.
2025-11-22 20:12:46 -06:00
Cameron Gutman
d40999ce06
Don't reset Qt's OpenGL state
...
We're using a different EGL context for SDL, so it's unnecessary.
2025-11-22 19:47:52 -06:00
Cameron Gutman
cb6d770b92
Restore the tooltip timeout-based hiding
...
The fade-out animation doesn't run on Linux when the window is
hidden, so the tooltips will reappear and fade on the app grid
which is ugly.
2025-11-22 19:35:23 -06:00
Cameron Gutman
4d6196c3d3
Use EGL for all X11 GL context creation in Qt and SDL
...
Using a mix of GLX and EGL can cause interoperability issues when
our EGLRenderer tries to bind an EGL context while Qt already has
a GLX context bound on the same thread. This was the source of a
number of confusing EGLRenderer failures over the years.
2025-11-22 18:51:32 -06:00
Cameron Gutman
54283ce0a1
Rework session initialization to return to the Qt event loop while connecting
...
We also display multiple launch warnings at the same time
2025-11-22 17:09:16 -06:00
Cameron Gutman
6313129603
Temporarily revert Windows ARM64 to Qt 6.10.0
...
aqtinstall needs a fix to handle Qt 6.10.1's new host/target qmake split.
2025-11-20 00:55:24 -06:00
Cameron Gutman
84d7a22638
Update CI builds to Qt 6.10.1
2025-11-20 00:22:22 -06:00
Cameron Gutman
f0aff0b0fb
Update VCRedist for VS 2026
2025-11-20 00:02:05 -06:00
Cameron Gutman
be358e9503
Update common-c with rewritten gamepad batching logic
2025-11-15 13:35:23 -06:00
Cameron Gutman
379d5ca376
Fix some compiler warnings
2025-11-15 13:34:11 -06:00
Cameron Gutman
8ed7144751
Disable bitrate reporting until FEC accuracy issues are resolved
2025-11-15 12:22:51 -06:00
Cameron Gutman
1160f40655
Recombine the YUV420 shader source
...
We don't build shaders with hardcoded CSC constants anymore.
2025-11-08 11:40:06 -06:00
Cameron Gutman
8324f61db0
Reduce per-frame GL calls in EGLRenderer
...
Uniforms are attached to the program object, so they don't need to
be set each time we swap between the YUV shader and the overlay
shader.
Since 0 overlays is by far the most common case and > 1 is highly
unlikely, move the glViewport() call into renderOverlay() to let
us skip it in the common case (and be no worse than today in the
2nd most common case of 1 overlay).
2025-11-06 17:52:30 -06:00
Cameron Gutman
9106f2c420
Disable the depth and stencil buffers
...
We don't have any need for either in our renderers.
2025-11-06 17:44:01 -06:00
Cameron Gutman
a2670dd568
Use hasFrameFormatChanged() in DRMRenderer
2025-11-06 00:04:08 -06:00
Cameron Gutman
c54e6e4459
Use hasFrameFormatChanged() in VDPAU
2025-11-05 23:58:51 -06:00
Cameron Gutman
dd6f1c5873
Use hasFrameFormatChanged() in SDLRenderer
2025-11-05 23:51:51 -06:00
Cameron Gutman
7fab5007a8
Switch Metal to the shared functions for CSC matrix generation and chroma co-siting
2025-11-05 23:22:15 -06:00
Cameron Gutman
7f7cc89e61
Switch EGLRenderer to the shared functions for CSC matrix generation and chroma co-siting
2025-11-05 22:27:31 -06:00
Cameron Gutman
7116efd8de
Switch D3D11VA to the shared functions for CSC matrix generation and chroma co-siting
2025-11-05 22:26:27 -06:00
Cameron Gutman
229f5e4cea
Add functions for color matrix generation and chroma co-siting in the renderer interface
2025-11-05 21:59:13 -06:00
Cameron Gutman
181dba5864
Use correct chroma co-siting offsets in Metal
2025-11-04 23:51:39 -06:00
Cameron Gutman
f67272b153
Handle chroma co-siting in the D3D11 shaders
2025-11-01 22:42:51 -05:00
Cameron Gutman
9b3050514b
Handle chroma co-siting in the Metal shaders
2025-11-01 21:57:13 -05:00
Cameron Gutman
2c12ad297f
Fix accuracy issues in YUV to RGB conversion of 10-bit content in Metal
...
See #1667 for details.
2025-11-01 19:19:19 -05:00
Cameron Gutman
50223dbdb8
Fix accuracy issues in YUV to RGB conversion of 10-bit content in D3D11VA
...
See #1667 for details.
2025-11-01 18:45:02 -05:00
Cameron Gutman
5244313b30
Improve archiving of Windows CI builds
2025-10-26 22:17:21 -05:00
Cameron Gutman
c13e6b08c1
Remove unused AppVeyor CI files
2025-10-26 21:55:58 -05:00
Cameron Gutman
151f5dd678
Switch to GitHub Actions for AppImage builds
2025-10-26 21:15:41 -05:00
Cameron Gutman
a34d40e3ee
Switch to GitHub Actions for Steam Link builds
2025-10-26 16:06:09 -05:00
Cameron Gutman
68aa04926e
Switch to GitHub Actions for Windows and macOS builds
2025-10-26 15:09:57 -05:00
Cameron Gutman
7d544c1ce4
Move audio capabilities out of the renderer classes
...
Since the removal of libsoundio, all renderers support arbitrary audio duration, so we can avoid having to start an audio session just to query capabilities.
2025-10-25 19:17:38 -05:00
Cameron Gutman
ac7696ea8f
Rebuild FFmpeg for macOS and OpenSSL for Windows
...
- Fixes unexpected Homebrew library dependency in macOS FFmpeg build
- Adds CFG and EHCont mitigations in Windows OpenSSL build
- Remove unused Windows avformat binaries
https://github.com/cgutman/moonlight-deps/commit/d3a3222573f1deefa175ade600702f17f56192fa
2025-10-25 18:13:13 -05:00
Cameron Gutman
4d303cebee
Consolidate all writes to the log stream in LoggerTask
...
This avoids some thread-safety issues when switching log modes or reaching the log size limit.
2025-10-25 00:33:02 -05:00
Cameron Gutman
bd6235efba
Use async logging while streaming only
...
The benefits of reliable output outweigh performance concerns during non-streaming activities.
2025-10-25 00:18:34 -05:00
Cameron Gutman
b1232e0ed4
Fix memory corruption due to concurrent QString operations
2025-10-24 23:38:07 -05:00
Cameron Gutman
c35f7086a0
Block the Bandicam Vulkan layer from loading into Moonlight
...
It installs a buggy vkDestroySwapchainKHR() hook that causes Moonlight to crash deterministically on startup.
Fixes #1425
2025-10-24 23:17:03 -05:00
Cameron Gutman
c7bc76325f
Revert macOS audio buffer size workaround
...
This causes excessive glitching and needs to be fixed by Apple (if it hasn't already in the 2 years since the report).
2025-10-23 21:42:44 -05:00
Cameron Gutman
ccaca68570
Don't use CAMetalDisplayLink on Intel Macs
...
When in Direct mode, skipping a frame will cause the display to flash black on Tahoe.
2025-10-23 21:16:53 -05:00
Cameron Gutman
57db20016a
Rewrite frame pacing mechanism for VTMetalRenderer
...
This should hopefully improve performance and avoid performance issues on Tahoe.
2025-10-23 19:43:10 -05:00
Cameron Gutman
bdb6d02dac
Add (currently harmless) missing break
2025-10-22 23:21:07 -05:00
Cameron Gutman
9bcc6291be
Auto-lock the cursor in single display borderless windowed scenarios
2025-10-22 23:13:03 -05:00
Cameron Gutman
14027f3c74
Limit the IME workaround to Windows only
2025-10-20 23:37:31 -05:00