From 6d556374b8ad46d2b2f8cd8f77a344c81a3311d7 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 4 Nov 2015 14:47:33 -0600 Subject: [PATCH] compositor-drm: fall back to EGL visual_id 0 if no others work 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 Reviewed-by: Bryce Harrington --- 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 41f9a821..a279dbab 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,