[PATCH weston] compositor-drm: fall back to EGL visual_id 0 if no others work

Derek Foreman derekf at osg.samsung.com
Wed Nov 4 12:47:33 PST 2015


commit e76f185 stopped using visuals with "native visual id" == 0

This broke some systems, so we now try 0 as a worst case fallback if
everything else has failed.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---

I'm not able to confirm myself that this fixes the bug it's intended to...

 src/compositor-drm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 41f9a82..a279dba 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1559,14 +1559,15 @@ fallback_format_for(uint32_t format)
 static int
 drm_backend_create_gl_renderer(struct drm_backend *b)
 {
-	EGLint format[2] = {
+	EGLint format[3] = {
 		b->format,
 		fallback_format_for(b->format),
+		0,
 	};
-	int n_formats = 1;
+	int n_formats = 2;
 
 	if (format[1])
-		n_formats = 2;
+		n_formats = 3;
 	if (gl_renderer->create(b->compositor,
 				EGL_PLATFORM_GBM_KHR,
 				(void *)b->gbm,
-- 
2.6.1



More information about the wayland-devel mailing list