mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Deprioritize the Nvidia VAAPI driver if Vulkan or CUDA are available
This commit is contained in:
@@ -442,10 +442,19 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prefer CUDA for XWayland and VDPAU for regular X11.
|
// Prefer Vulkan Video for Nvidia GPUs (and VDPAU for regular X11).
|
||||||
if (m_WindowSystem == SDL_SYSWM_X11 && vendorStr.contains("VA-API NVDEC", Qt::CaseInsensitive)) {
|
//
|
||||||
|
// We avoid the Nvidia VAAPI driver because:
|
||||||
|
// - It can hang in vaSyncSurface() during buffer import (older versions in particular)
|
||||||
|
// - The 16-bpc planar types cannot be imported into Vulkan due to incompatible DRM modifiers
|
||||||
|
// - EGL is broken in their driver, so we're stuck using the slow copy path in SDL renderer
|
||||||
|
if (
|
||||||
|
#if !defined(HAVE_LIBPLACEBO_VULKAN) && !defined(HAVE_CUDA)
|
||||||
|
m_WindowSystem == SDL_SYSWM_X11 &&
|
||||||
|
#endif
|
||||||
|
vendorStr.contains("VA-API NVDEC", Qt::CaseInsensitive)) {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Deprioritizing VAAPI for NVIDIA driver on X11/XWayland. Set FORCE_VAAPI=1 to override.");
|
"Deprioritizing VAAPI for NVIDIA driver. Set FORCE_VAAPI=1 to override.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user