[vlc-commits] [Git][videolan/vlc][master] qt: care about `QSG_RHI_PREFER_SOFTWARE_RENDERER` in custom RHI fallback
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Aug 31 12:39:57 UTC 2024
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
83ec7818 by Fatih Uzunoglu at 2024-08-31T12:28:00+00:00
qt: care about `QSG_RHI_PREFER_SOFTWARE_RENDERER` in custom RHI fallback
Starting with Qt 6.4.0, Qt Quick tries to use software renderer if RHI
creation fails. We don't want that behavior, since we would rather use
OpenGL or Qt Quick's own software backend than DirectX WARP. However,
if the user explicitly uses `QSG_RHI_PREFER_SOFTWARE_RENDERER`, then
we should respect that.
- - - - -
1 changed file:
- modules/gui/qt/qt.cpp
Changes:
=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -897,12 +897,13 @@ static void *Thread( void *obj )
app.setProperty("initialStyle", app.style()->objectName());
#if defined(_WIN32)
- // TODO: Qt Quick RHI Fallback does not work (Qt 6.7.1).
- // D3D_FEATURE_LEVEL_11_1, which is required by Qt
- // may not be supported. In order to avoid crash,
- // fallback to OpenGL, or Software mode.
+ // NOTE: Qt Quick does not have a cross-API RHI fallback procedure (as of Qt 6.7.1).
+ // We have to manually pick a graphics api here, since the default graphics
+ // api (Direct3D 11.2) may not be supported.
- if (qEnvironmentVariableIsEmpty("QSG_RHI_BACKEND") && qEnvironmentVariableIsEmpty("QT_QUICK_BACKEND"))
+ if (qEnvironmentVariableIsEmpty("QSG_RHI_BACKEND") &&
+ qEnvironmentVariableIsEmpty("QT_QUICK_BACKEND") &&
+ (QT_VERSION < QT_VERSION_CHECK(6, 4, 0) || !uint(qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER"))))
{
// If OS version is lower than Windows 8.1, and Qt version is lower than
// 6.6.0, do not take risk and use OpenGL (since probing is not available).
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/83ec7818d3bd893f7373a6522e822b3834f58f64
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/83ec7818d3bd893f7373a6522e822b3834f58f64
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list