From da4f185faae9ea7e42d2c6f6ddfa95ea63592ab7 Mon Sep 17 00:00:00 2001
From: Emil Velikov <emil.velikov@collabora.com>
Date: Thu, 18 Oct 2018 15:58:09 +0100
Subject: [PATCH] libweston: print EGL information as early as possible

In the case where CreateContext/MakeCurrent fails, we still want to
know what the EGL driver is capable of.

Move the EGL info printing, just after the eglInitialize() call to
ensure that.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 libweston/gl-renderer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
index afa08d6c91..0fde2ad25e 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -3505,6 +3505,8 @@ gl_renderer_display_create(struct weston_compositor *ec, EGLenum platform,
 		goto fail_with_error;
 	}
 
+	log_egl_info(gr->egl_display);
+
 	if (egl_choose_config(gr, config_attribs, visual_id,
 			      n_ids, &gr->egl_config) < 0) {
 		weston_log("failed to choose EGL config\n");
@@ -3741,7 +3743,6 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
 		gr->gl_version = GR_GL_VERSION(2, 0);
 	}
 
-	log_egl_info(gr->egl_display);
 	log_gl_info();
 
 	gr->image_target_texture_2d =
-- 
GitLab