Don't try fallback driver paths with the host libva

This commit is contained in:
Cameron Gutman
2026-09-05 14:30:28 -05:00
parent c045ae8986
commit 54f8fed51d
2 changed files with 3 additions and 4 deletions
@@ -341,14 +341,13 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
break;
}
#if defined(APP_IMAGE) || defined(USE_FALLBACK_DRIVER_PATHS)
// AppImages will be running with our libva.so which means they don't know about
// AppImages may be running with our libva.so which means they don't know about
// distro-specific driver paths. To avoid failing in this scenario, we'll hardcode
// some such paths here for common distros. Non-AppImage packaging mechanisms won't
// need this fallback because either:
// a) They are using both distro libva.so and distro libva drivers (native packages)
// b) They are using both runtime libva.so and runtime libva drivers (Flatpak/Snap)
if (qEnvironmentVariableIsEmpty("LIBVA_DRIVERS_PATH")) {
if (qEnvironmentVariableIsEmpty("LIBVA_DRIVERS_PATH") && qgetenv("VAAPI_USE_FALLBACK_PATHS") == "1") {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Trying fallback VAAPI driver paths");
@@ -370,7 +369,6 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
setPathVar = true;
}
else
#endif
{
if (setPathVar) {
// Unset LIBVA_DRIVERS_PATH if we set it ourselves
+1
View File
@@ -113,6 +113,7 @@ LIBVA_FALLBACK="$APPDIR/opt/libva-fallback"
if [ -d "$LIBVA_FALLBACK" ] && ! "$LIBVA_FALLBACK/libva-probe" 2>/dev/null; then
export LD_LIBRARY_PATH="$LIBVA_FALLBACK${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export VAAPI_USE_FALLBACK_PATHS=1
fi
exec "$APPDIR/usr/bin/moonlight" "$@"