diff --git a/libweston/renderer-gl/egl-glue.c b/libweston/renderer-gl/egl-glue.c index 013172af..c9e8172a 100644 --- a/libweston/renderer-gl/egl-glue.c +++ b/libweston/renderer-gl/egl-glue.c @@ -477,7 +477,7 @@ gl_renderer_set_egl_device(struct gl_renderer *gr) return; } - gl_renderer_log_extensions("EGL device extensions", extensions); + gl_renderer_log_extensions(gr, "EGL device extensions", extensions); /* Try to query the render node using EGL_DRM_RENDER_NODE_FILE_EXT */ if (weston_check_egl_extension(extensions, "EGL_EXT_device_drm_render_node")) @@ -573,8 +573,7 @@ gl_renderer_setup_egl_client_extensions(struct gl_renderer *gr) return 0; } - gl_renderer_log_extensions("EGL client extensions", - extensions); + gl_renderer_log_extensions(gr, "EGL client extensions", extensions); if (weston_check_egl_extension(extensions, "EGL_EXT_device_query")) { gr->query_display_attrib = diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h index b8230d8f..db541921 100644 --- a/libweston/renderer-gl/gl-renderer-internal.h +++ b/libweston/renderer-gl/gl-renderer-internal.h @@ -213,7 +213,8 @@ void gl_renderer_print_egl_error_state(void); void -gl_renderer_log_extensions(const char *name, const char *extensions); +gl_renderer_log_extensions(struct gl_renderer *gr, + const char *name, const char *extensions); void log_egl_config_info(EGLDisplay egldpy, EGLConfig eglconfig); diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 4cfe431e..fd7b28fb 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -3241,7 +3241,8 @@ gl_renderer_create_surface(struct weston_surface *surface) } void -gl_renderer_log_extensions(const char *name, const char *extensions) +gl_renderer_log_extensions(struct gl_renderer *gr, + const char *name, const char *extensions) { const char *p, *end; int l; @@ -3264,7 +3265,7 @@ gl_renderer_log_extensions(const char *name, const char *extensions) } static void -log_egl_info(EGLDisplay egldpy) +log_egl_info(struct gl_renderer *gr, EGLDisplay egldpy) { const char *str; @@ -3278,11 +3279,11 @@ log_egl_info(EGLDisplay egldpy) weston_log("EGL client APIs: %s\n", str ? str : "(null)"); str = eglQueryString(egldpy, EGL_EXTENSIONS); - gl_renderer_log_extensions("EGL extensions", str ? str : "(null)"); + gl_renderer_log_extensions(gr, "EGL extensions", str ? str : "(null)"); } static void -log_gl_info(void) +log_gl_info(struct gl_renderer *gr) { const char *str; @@ -3299,7 +3300,7 @@ log_gl_info(void) weston_log("GL renderer: %s\n", str ? str : "(null)"); str = (char *)glGetString(GL_EXTENSIONS); - gl_renderer_log_extensions("GL extensions", str ? str : "(null)"); + gl_renderer_log_extensions(gr, "GL extensions", str ? str : "(null)"); } static void @@ -3686,7 +3687,7 @@ gl_renderer_display_create(struct weston_compositor *ec, weston_drm_format_array_init(&gr->supported_formats); - log_egl_info(gr->egl_display); + log_egl_info(gr, gr->egl_display); ec->renderer = &gr->base; @@ -3919,7 +3920,7 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface) } gr->gl_version = get_gl_version(); - log_gl_info(); + log_gl_info(gr); gr->image_target_texture_2d = (void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");