compositor: log more EGL and GL info
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
1b3c1ea880
commit
4e4167d3a0
+36
-7
@@ -2906,7 +2906,8 @@ log_extensions(const char *name, const char *extensions)
|
|||||||
while (*p) {
|
while (*p) {
|
||||||
end = strchrnul(p, ' ');
|
end = strchrnul(p, ' ');
|
||||||
if (l + (end - p) > 78)
|
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
|
else
|
||||||
l += weston_log_continue(" %.*s", end - p, p);
|
l += weston_log_continue(" %.*s", end - p, p);
|
||||||
for (p = end; isspace(*p); p++)
|
for (p = end; isspace(*p); p++)
|
||||||
@@ -2915,6 +2916,39 @@ log_extensions(const char *name, const char *extensions)
|
|||||||
weston_log_continue("\n");
|
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
|
WL_EXPORT int
|
||||||
weston_compositor_init(struct weston_compositor *ec,
|
weston_compositor_init(struct weston_compositor *ec,
|
||||||
struct wl_display *display,
|
struct wl_display *display,
|
||||||
@@ -2955,10 +2989,7 @@ weston_compositor_init(struct weston_compositor *ec,
|
|||||||
|
|
||||||
wl_display_init_shm(display);
|
wl_display_init_shm(display);
|
||||||
|
|
||||||
weston_log("egl vendor: %s\n",
|
log_egl_gl_info(ec->display);
|
||||||
eglQueryString(ec->display, EGL_VENDOR));
|
|
||||||
log_extensions("egl extensions",
|
|
||||||
eglQueryString(ec->display, EGL_EXTENSIONS));
|
|
||||||
|
|
||||||
ec->image_target_texture_2d =
|
ec->image_target_texture_2d =
|
||||||
(void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
(void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
||||||
@@ -2977,8 +3008,6 @@ weston_compositor_init(struct weston_compositor *ec,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_extensions("gles2 extensions", extensions);
|
|
||||||
|
|
||||||
if (!strstr(extensions, "GL_EXT_texture_format_BGRA8888")) {
|
if (!strstr(extensions, "GL_EXT_texture_format_BGRA8888")) {
|
||||||
weston_log("GL_EXT_texture_format_BGRA8888 not available\n");
|
weston_log("GL_EXT_texture_format_BGRA8888 not available\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user