[mutter] onscreen/native: Don't try rendering on a secondary GPU without EGL
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] onscreen/native: Don't try rendering on a secondary GPU without EGL
- Date: Wed, 30 Mar 2022 13:00:48 +0000 (UTC)
commit 41bfabad96ee7c829ed17b585a752f3e676f6ab4
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Fri Mar 18 18:23:29 2022 +0800
onscreen/native: Don't try rendering on a secondary GPU without EGL
We rather confusingly still call a secondary display card that is
GPU-less (DisplayLink or other basic KMS device) a "secondary GPU",
so just because secondary_gpu_state is non-NULL doesn't mean we
can use it for rendering. The clearest indication of this is when
there is no EGL surface.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2341>
src/backends/native/meta-onscreen-native.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index 3eb5503193..f2c2090dd1 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -757,6 +757,10 @@ copy_shared_framebuffer_primary_gpu (CoglOnscreen *onscre
COGL_TRACE_BEGIN_SCOPED (CopySharedFramebufferPrimaryGpu,
"FB Copy (primary GPU)");
+ if (!secondary_gpu_state ||
+ secondary_gpu_state->egl_surface == EGL_NO_SURFACE)
+ return FALSE;
+
primary_gpu = meta_renderer_native_get_primary_gpu (renderer_native);
primary_gpu_data =
meta_renderer_native_get_gpu_data (renderer_native, primary_gpu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]