From 64673fbfc95e640569e7e633db1511646c7d52ff Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 7 Feb 2024 12:28:13 +0100 Subject: [PATCH] Backport upstream fix: disable threaded GL on desktop NVIDIA --- qt6-qtwayland.spec | 9 +++-- ...isable-threaded-gl-on-desktop-nvidia.patch | 40 +++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 qtwayland-client-disable-threaded-gl-on-desktop-nvidia.patch diff --git a/qt6-qtwayland.spec b/qt6-qtwayland.spec index a1c981b..7ba829b 100644 --- a/qt6-qtwayland.spec +++ b/qt6-qtwayland.spec @@ -11,7 +11,7 @@ Summary: Qt6 - Wayland platform support and QtCompositor module Name: qt6-%{qt_module} Version: 6.6.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 Url: http://www.qt.io @@ -25,10 +25,10 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod %endif # Upstream patches +Patch0: qtwayland-client-disable-threaded-gl-on-desktop-nvidia.patch # Upstreamable patches - -Patch0: qtwayland-use-adwaita-decorations-by-default.patch +Patch10: qtwayland-use-adwaita-decorations-by-default.patch # filter qml provides %global __provides_exclude_from ^%{_qt6_archdatadir}/qml/.*\\.so$ @@ -174,6 +174,9 @@ popd %endif %changelog +* Wed Feb 07 2024 Jan Grulich +- Backport upstream fix: disable threaded GL on desktop NVIDIA + * Fri Jan 26 2024 Fedora Release Engineering - 6.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/qtwayland-client-disable-threaded-gl-on-desktop-nvidia.patch b/qtwayland-client-disable-threaded-gl-on-desktop-nvidia.patch new file mode 100644 index 0000000..e990de2 --- /dev/null +++ b/qtwayland-client-disable-threaded-gl-on-desktop-nvidia.patch @@ -0,0 +1,40 @@ +From e4156bad6398dcbe8740041148d95ee9ed437d8b Mon Sep 17 00:00:00 2001 +From: David Redondo +Date: Wed, 31 Jan 2024 09:01:48 +0100 +Subject: [PATCH] client: Disable threaded GL on desktop NVIDIA + +Otherwise QtQuick windows freeze when resized. +In order to still use threaded rendering on +embedded platforms where resizing is not required +we check if XDG_CURRENT_DESKTOP which should be +set by desktop environments. + +Task-number: QTBUG-95817 +Pick-to: 6.6.2 +Change-Id: Ic2348c3169e0ade8c5463e3d7c7a1c45037a89a7 +Reviewed-by: Eskil Abrahamsen Blomfeldt +Reviewed-by: David Edmundson +(cherry picked from commit 6d83cf94b568fa9e591761a182cf84e3959fbf32) +Reviewed-by: Qt Cherry-pick Bot +(cherry picked from commit 38348ce5b06624cb6e36f814ebdfbc3ec61f1691) +Reviewed-by: David Redondo +--- + +diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp +index cc7ee90..3b97aef 100644 +--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp ++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp +@@ -92,6 +92,13 @@ + break; + } + } ++ ++ // On desktop NVIDIA resizing QtQuick freezes them when using threaded rendering QTBUG-95817 ++ // In order to support threaded rendering on embedded platforms where resizing is not needed ++ // we check if XDG_CURRENT_DESKTOP is set which desktop environments should set ++ if (qstrcmp(vendor, "NVIDIA") == 0 && qEnvironmentVariableIsSet("XDG_CURRENT_DESKTOP")) { ++ m_supportsThreading = false; ++ } + } + + bool QWaylandEglClientBufferIntegration::isValid() const