mutter/src/backends
Pekka Paalanen 22f865122c renderer/native: Prefer hardware rendering for primary GPU
Mutter prefers platform devices over anything else as the primary GPU.
This will not work too well, when a platform device does not actually
have a rendering GPU but is a display-only device. An example of this
are DisplayLink devices with the proprietary driver stack, which exposes
a DRM KMS platform device but without any rendering driver.

Mutter cannot rely on EGL init failing on such devices either, because
nowadays Mesa supports software renderers on GBM, so the initialization
may well succeed.

The hardware rendering capability is recognized by matching the GL
renderer string to the known Mesa software renderers. At this time,
there is no better alternative to detecting this.

The secondary GPU data is abused for the GL renderer, as the Cogl
context may not have been created yet.  Also, the Cogl context would
only be created on the primary GPU, but at this point the primary GPU
has not been chosen yet. Hence, GPU copy path GL context is used as a
proxy and predictor of what the Cogl context might be if it was created.
Mind, that even the GL flavour are not the same between Cogl and
secondary contexts, so this is stretch but it should be just enough.

The logic to choose the primary GPU is changed to always prefer hardware
rendering devices while also maintaining the old order of preferring
platform over boot_vga devices.

Co-authored by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
..
native renderer/native: Prefer hardware rendering for primary GPU 2019-01-13 10:30:44 +00:00
x11 Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
edid-parse.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
edid.h edid: Remove unused declarations 2014-09-12 11:55:08 -06:00
gsm-inhibitor-flag.h idle-monitor: Take idle inhibition into account 2018-04-16 13:28:03 +02:00
meta-backend-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-backend-types.h monitor-transform: Move helper functions into their own file 2019-01-05 14:15:23 +01:00
meta-backend.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-barrier-private.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-barrier.c x11: Require XInput 2.3 at build time 2018-11-06 17:17:36 +01:00
meta-crtc.c backends: Split out CRTC/output management to MetaGpu 2017-10-05 18:05:20 -04:00
meta-crtc.h monitor-transform: Move helper functions into their own file 2019-01-05 14:15:23 +01:00
meta-cursor-renderer.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-cursor-renderer.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-cursor-sprite-xcursor.c cursor-renderer/native: Let the backend realize cursor sprite itself 2018-06-15 19:09:55 +00:00
meta-cursor-sprite-xcursor.h cursor-renderer: Fetch instead of pass Xcursor image when realizing 2018-06-15 19:09:52 +00:00
meta-cursor-tracker-private.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-cursor-tracker.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-cursor.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-cursor.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-dbus-session-watcher.c Add remote desktop and screen cast functionality 2017-08-29 14:39:04 +08:00
meta-dbus-session-watcher.h Add remote desktop and screen cast functionality 2017-08-29 14:39:04 +08:00
meta-display-config-shared.h Remove trailing whitespace 2014-05-02 09:34:48 -04:00
meta-dnd-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-egl-ext.h egl: Add EGL_RESOURCE_BUSY_EXT error 2017-03-04 18:34:17 +08:00
meta-egl.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-egl.h renderer/native: Force EGL config pixel format 2018-03-05 15:42:27 +00:00
meta-gles3-table.h backends: Add OpenGL ES 3 abstraction layer 2017-10-05 18:17:26 -04:00
meta-gles3.c backends: Add OpenGL ES 3 abstraction layer 2017-10-05 18:17:26 -04:00
meta-gles3.h backends: Add OpenGL ES 3 abstraction layer 2017-10-05 18:17:26 -04:00
meta-gpu.c backends: Split out CRTC/output management to MetaGpu 2017-10-05 18:05:20 -04:00
meta-gpu.h gpu: Drop unused declaration 2018-11-19 14:58:48 +00:00
meta-idle-monitor-dbus.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-idle-monitor-dbus.h Start molding out a new src/backends/ dir 2014-03-31 22:11:00 -04:00
meta-idle-monitor-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-idle-monitor.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-input-mapper-private.h backends: Add MetaInputMapper method to lookup devices from outputs 2018-12-06 14:44:46 +00:00
meta-input-mapper.c backends: Add MetaInputMapper method to lookup devices from outputs 2018-12-06 14:44:46 +00:00
meta-input-settings-private.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-input-settings.c input-settings: treat a serial of 1 as serial of 0 2018-12-17 16:12:50 +10:00
meta-logical-monitor.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-logical-monitor.h output: Turn winsys_id into a uint64_t 2018-11-19 14:58:48 +00:00
meta-monitor-config-manager.c monitor-config-manager: Round layout size after scaling 2018-12-05 10:34:22 +00:00
meta-monitor-config-manager.h monitor-manager: use MonitorsConfig to track switch_config 2018-10-08 15:53:45 +08:00
meta-monitor-config-migration.c monitor-config-migration: Discard if configured mode is missing 2017-10-04 09:45:02 -04:00
meta-monitor-config-migration.h Migrate old monitor configuration files to new system 2017-08-21 12:23:51 +08:00
meta-monitor-config-store.c monitor-config: Keep track of disabled monitors for stored configs 2017-10-02 15:34:24 -04:00
meta-monitor-config-store.h Migrate old monitor configuration files to new system 2017-08-21 12:23:51 +08:00
meta-monitor-manager-dummy.c monitor-manager-dummy: Allow to pass extra monitor specs via env 2018-12-05 10:34:22 +00:00
meta-monitor-manager-dummy.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-monitor-manager-private.h Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-monitor-manager.c backends: Silence a couple of gtk-doc warnings 2019-01-08 09:06:11 +01:00
meta-monitor-transform.c monitor-transform: Add helper function transform_invert() 2019-01-05 14:18:02 +01:00
meta-monitor-transform.h monitor-transform: Add helper function transform_invert() 2019-01-05 14:18:02 +01:00
meta-monitor.c output: Turn winsys_id into a uint64_t 2018-11-19 14:58:48 +00:00
meta-monitor.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-orientation-manager.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-orientation-manager.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-output.c backends: Add logical monitor -> monitor -> output -> crtc ref chain 2018-06-28 13:42:15 +02:00
meta-output.h output: Turn winsys_id into a uint64_t 2018-11-19 14:58:48 +00:00
meta-pointer-constraint.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-pointer-constraint.h Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-remote-access-controller-private.h Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-access-controller.c Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-desktop-session.c remote-desktop: Do not leak the virtual touchscreen 2018-11-19 15:41:43 +00:00
meta-remote-desktop-session.h Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-desktop.c Pass -D_GNU_SOURCE instead of defining it in source 2018-11-06 17:17:36 +01:00
meta-remote-desktop.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-renderer-view.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-renderer-view.h renderer-view: Add view transform getter 2017-04-07 22:30:49 +08:00
meta-renderer.c backends: Silence a couple of gtk-doc warnings 2019-01-08 09:06:11 +01:00
meta-renderer.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-screen-cast-monitor-stream-src.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-screen-cast-monitor-stream-src.h ScreenCast: Pass PipeWire stream node ID directly 2017-08-29 14:39:04 +08:00
meta-screen-cast-monitor-stream.c screen-cast-stream: Add API to transform relative coordinates 2018-02-23 19:33:31 +08:00
meta-screen-cast-monitor-stream.h Add remote desktop and screen cast functionality 2017-08-29 14:39:04 +08:00
meta-screen-cast-session.c screen-cast-session: Add window-id support 2018-12-14 13:26:16 +01:00
meta-screen-cast-session.h Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-screen-cast-stream-src.c screen-cast-src: Add VideoCrop support 2018-12-14 13:26:16 +01:00
meta-screen-cast-stream-src.h screen-cast-src: Add VideoCrop support 2018-12-14 13:26:16 +01:00
meta-screen-cast-stream.c screen-cast-stream: Add API to transform relative coordinates 2018-02-23 19:33:31 +08:00
meta-screen-cast-stream.h screen-cast-stream: Add API to transform relative coordinates 2018-02-23 19:33:31 +08:00
meta-screen-cast-window-stream-src.c screen-cast-session: Add screen-cast window mode 2018-12-14 13:26:16 +01:00
meta-screen-cast-window-stream-src.h screen-cast-session: Add screen-cast window mode 2018-12-14 13:26:16 +01:00
meta-screen-cast-window-stream.c screen-cast-session: Add screen-cast window mode 2018-12-14 13:26:16 +01:00
meta-screen-cast-window-stream.h screen-cast-session: Add screen-cast window mode 2018-12-14 13:26:16 +01:00
meta-screen-cast-window.c screen-cast: Add screen-cast-window interface 2018-12-14 13:26:16 +01:00
meta-screen-cast-window.h screen-cast: Add screen-cast-window interface 2018-12-14 13:26:16 +01:00
meta-screen-cast.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-screen-cast.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-settings-private.h Make screen cast and remote desktop non-experimental 2018-06-07 12:57:51 +00:00
meta-settings.c settings: Remove confused comment 2018-06-07 12:57:52 +00:00
meta-stage-private.h backends/stage: Remove unused function declaration 2018-11-09 11:16:30 +01:00
meta-stage.c backends/stage: Remove MetaStagePrivate 2018-11-09 11:16:30 +01:00