mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
MetaRendererNative: Give EGLDevice backend priority over GBM
With GLVND, whenever we have both Mesa's and NVIDIA's drives installed in the system, initializing the GBM backend will always succeed, regardless of what GPU you have on your system. This is due to GBM's software rendering fallback. It seems better to initialize the EGLDevice backend first, which will fail to find a device match when given a non-NVIDIA GPU. https://bugzilla.gnome.org/show_bug.cgi?id=784272
This commit is contained in:
parent
80e5955918
commit
7eea82d3d7
@ -2070,16 +2070,21 @@ meta_renderer_native_initable_init (GInitable *initable,
|
||||
GError *egl_device_error = NULL;
|
||||
#endif
|
||||
|
||||
if (init_gbm (renderer_native, &gbm_error))
|
||||
return TRUE;
|
||||
|
||||
#ifdef HAVE_EGL_DEVICE
|
||||
/* Try to initialize the EGLDevice backend first. Whenever we use a
|
||||
* non-NVIDIA GPU, the EGLDevice enumeration function won't find a match, and
|
||||
* we'll fall back to GBM (which will always succeed as it has a software
|
||||
* rendering fallback)
|
||||
*/
|
||||
if (init_egl_device (renderer_native, &egl_device_error))
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
if (init_gbm (renderer_native, &gbm_error))
|
||||
{
|
||||
g_error_free (gbm_error);
|
||||
g_error_free (egl_device_error);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_set_error (error, G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
|
Loading…
Reference in New Issue
Block a user