|
| 1 | +From 03c7dcc3280530dacf58620d169ff9c540c04592 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Peter Varga <pvarga@inf.u-szeged.hu> |
| 3 | +Date: Tue, 11 Mar 2025 09:19:16 +0100 |
| 4 | +Subject: [PATCH] [angle] Always use primary GPU |
| 5 | + |
| 6 | +Since https://crrev.com/c/5320107, ANGLE may choose another GPU what Qt |
| 7 | +uses with an EGL configuration. This may lead to sporadic crashes when |
| 8 | +ANGLE uses the native EGL context. |
| 9 | + |
| 10 | +It is reproducible with integrated Intel GPU and dedicated Nvidia GPU. |
| 11 | +If the primary GPU is Nvidia and the kernel mode setting (KMS) is not |
| 12 | +explicitly enabled for the driver, it will fail to access DRM and will |
| 13 | +fallback to Intel. |
| 14 | + |
| 15 | +As a workaround, stop prioritizing EGL drivers with DRM support. |
| 16 | + |
| 17 | +Change-Id: I5d346fdc0db59521e4a2d323c8b230a75f128eaa |
| 18 | +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/630511 |
| 19 | +Reviewed-by: Moss Heim <moss.heim@qt.io> |
| 20 | +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> |
| 21 | +--- |
| 22 | + |
| 23 | +diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp |
| 24 | +index f9bd8aa..aa68b72 100644 |
| 25 | +--- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp |
| 26 | ++++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp |
| 27 | +@@ -245,7 +245,7 @@ |
| 28 | + // extensions once the display is created and initialized. |
| 29 | + queryExtensions(); |
| 30 | + |
| 31 | +-#if defined(ANGLE_HAS_LIBDRM) |
| 32 | ++#if defined(ANGLE_HAS_LIBDRM) && !defined(TOOLKIT_QT) |
| 33 | + mEGLDisplay = getPreferredDisplay(&majorVersion, &minorVersion); |
| 34 | + #endif // defined(ANGLE_HAS_LIBDRM) |
| 35 | + |
0 commit comments