GNOME Bugzilla – Bug 784272
MetaRendererNative: Give EGLDevice backend priority over GBM
Last modified: 2017-07-07 20:38:23 UTC
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.
Created attachment 354601 [details] [review] 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.
Adding Jonas as suggested reviewer.
Review of attachment 354601 [details] [review]: Yep. I don't have a better solution for auto detection, so lets do this. ::: src/backends/native/meta-renderer-native.c @@ +2076,3 @@ + * we'll fall back to GBM (which will always succeed as it has a software + * rendering fallback) + */ nit: No need for this comment as its already in the git history.
Created attachment 354640 [details] [review] MetaRendererNative: Give EGLDevice backend priority over GBM Addressed comments for 354601
Attachment 354640 [details] pushed as 7eea82d - MetaRendererNative: Give EGLDevice backend priority over GBM
This patch broke the Mutter build. ../../src/backends/native/meta-renderer-native.c: In function 'meta_renderer_native_initable_init': ../../src/backends/native/meta-renderer-native.c:2085:21: error: 'egl_device_error' undeclared (first use in this function) g_error_free (egl_device_error); ^ ../../src/backends/native/meta-renderer-native.c:2085:21: note: each undeclared identifier is reported only once for each function it appears in Makefile:2196: recipe for target 'backends/native/meta-renderer-native.lo' failed Full build log: http://build.gnome.org/continuous/buildmaster/builds/2017/07/07/14/build/log-mutter.txt
Missing #ifdef on a g_error_free(). Already on master before I noticed this was reopened.
Thanks for the quick fix, Jonas.