mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Use VAAPI decoder for AMD on Wayland
This commit is contained in:
@@ -114,11 +114,12 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
"Driver: %s",
|
"Driver: %s",
|
||||||
vendorString ? vendorString : "<unknown>");
|
vendorString ? vendorString : "<unknown>");
|
||||||
|
|
||||||
// AMD's Gallium VAAPI driver has a nasty memory leak
|
// AMD's Gallium VAAPI driver has a nasty memory leak that causes memory
|
||||||
// that causes memory to be leaked for each submitted frame.
|
// to be leaked for each submitted frame. The Flatpak runtime has a VDPAU
|
||||||
// The Flatpak runtime has a VDPAU driver in place that works
|
// driver in place that works well, so use that instead on AMD systems. If
|
||||||
// well, so use that instead on AMD systems.
|
// we're using Wayland, we have no choice but to use VAAPI because VDPAU
|
||||||
if (vendorString && qgetenv("FORCE_VAAPI") != "1") {
|
// is only supported under X11.
|
||||||
|
if (vendorString && qgetenv("FORCE_VAAPI") != "1" && m_WindowSystem == SDL_SYSWM_X11) {
|
||||||
QString vendorStr(vendorString);
|
QString vendorStr(vendorString);
|
||||||
if (vendorStr.contains("AMD", Qt::CaseInsensitive) ||
|
if (vendorStr.contains("AMD", Qt::CaseInsensitive) ||
|
||||||
vendorStr.contains("Radeon", Qt::CaseInsensitive)) {
|
vendorStr.contains("Radeon", Qt::CaseInsensitive)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user