gles2: check eglBindWaylandDisplayWL return value
If the bind fails, do not bother pretending the EGL Wayland extension is usable, and no need to unbind, either. Print some important details about the GLESv2 renderer configuration into the log. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
9c3fe25b4d
commit
035a0323ef
|
@ -1258,8 +1258,11 @@ gles2_renderer_init(struct weston_compositor *ec)
|
|||
|
||||
if (strstr(extensions, "EGL_WL_bind_wayland_display"))
|
||||
ec->has_bind_display = 1;
|
||||
if (ec->has_bind_display)
|
||||
ec->bind_display(ec->egl_display, ec->wl_display);
|
||||
if (ec->has_bind_display) {
|
||||
ret = ec->bind_display(ec->egl_display, ec->wl_display);
|
||||
if (!ret)
|
||||
ec->has_bind_display = 0;
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
|
||||
|
@ -1292,5 +1295,13 @@ gles2_renderer_init(struct weston_compositor *ec)
|
|||
renderer->base.destroy_surface = gles2_renderer_destroy_surface;
|
||||
ec->renderer = &renderer->base;
|
||||
|
||||
weston_log("GL ES 2 renderer features:\n");
|
||||
weston_log_continue(STAMP_SPACE "read-back format: %s\n",
|
||||
ec->read_format == GL_BGRA_EXT ? "BGRA" : "RGBA");
|
||||
weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
|
||||
ec->has_unpack_subimage ? "yes" : "no");
|
||||
weston_log_continue(STAMP_SPACE "EGL Wayland extension: %s\n",
|
||||
ec->has_bind_display ? "yes" : "no");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue