mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-24 23:00:10 +01:00
compositor: log more EGL and GL info
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
1b3c1ea880
commit
4e4167d3a0
1 changed files with 36 additions and 7 deletions
|
|
@ -2906,7 +2906,8 @@ log_extensions(const char *name, const char *extensions)
|
|||
while (*p) {
|
||||
end = strchrnul(p, ' ');
|
||||
if (l + (end - p) > 78)
|
||||
l = weston_log_continue("\n %.*s", end - p, p);
|
||||
l = weston_log_continue("\n" STAMP_SPACE "%.*s",
|
||||
end - p, p);
|
||||
else
|
||||
l += weston_log_continue(" %.*s", end - p, p);
|
||||
for (p = end; isspace(*p); p++)
|
||||
|
|
@ -2915,6 +2916,39 @@ log_extensions(const char *name, const char *extensions)
|
|||
weston_log_continue("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
log_egl_gl_info(EGLDisplay egldpy)
|
||||
{
|
||||
const char *str;
|
||||
|
||||
str = eglQueryString(egldpy, EGL_VERSION);
|
||||
weston_log("EGL version: %s\n", str ? str : "(null)");
|
||||
|
||||
str = eglQueryString(egldpy, EGL_VENDOR);
|
||||
weston_log("EGL vendor: %s\n", str ? str : "(null)");
|
||||
|
||||
str = eglQueryString(egldpy, EGL_CLIENT_APIS);
|
||||
weston_log("EGL client APIs: %s\n", str ? str : "(null)");
|
||||
|
||||
str = eglQueryString(egldpy, EGL_EXTENSIONS);
|
||||
log_extensions("EGL extensions", str ? str : "(null)");
|
||||
|
||||
str = (char *)glGetString(GL_VERSION);
|
||||
weston_log("GL version: %s\n", str ? str : "(null)");
|
||||
|
||||
str = (char *)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
weston_log("GLSL version: %s\n", str ? str : "(null)");
|
||||
|
||||
str = (char *)glGetString(GL_VENDOR);
|
||||
weston_log("GL vendor: %s\n", str ? str : "(null)");
|
||||
|
||||
str = (char *)glGetString(GL_RENDERER);
|
||||
weston_log("GL renderer: %s\n", str ? str : "(null)");
|
||||
|
||||
str = (char *)glGetString(GL_EXTENSIONS);
|
||||
log_extensions("GL extensions", str ? str : "(null)");
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
weston_compositor_init(struct weston_compositor *ec,
|
||||
struct wl_display *display,
|
||||
|
|
@ -2955,10 +2989,7 @@ weston_compositor_init(struct weston_compositor *ec,
|
|||
|
||||
wl_display_init_shm(display);
|
||||
|
||||
weston_log("egl vendor: %s\n",
|
||||
eglQueryString(ec->display, EGL_VENDOR));
|
||||
log_extensions("egl extensions",
|
||||
eglQueryString(ec->display, EGL_EXTENSIONS));
|
||||
log_egl_gl_info(ec->display);
|
||||
|
||||
ec->image_target_texture_2d =
|
||||
(void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
||||
|
|
@ -2977,8 +3008,6 @@ weston_compositor_init(struct weston_compositor *ec,
|
|||
return -1;
|
||||
}
|
||||
|
||||
log_extensions("gles2 extensions", extensions);
|
||||
|
||||
if (!strstr(extensions, "GL_EXT_texture_format_BGRA8888")) {
|
||||
weston_log("GL_EXT_texture_format_BGRA8888 not available\n");
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue