gl_renderer: log EGL features

Log EGL features similar to how GL ES features are logged: listing just
the ones weston tests for.

This replaces some log messages from gl-renderer.c that become
redundant or belong with EGL better.

has_native_fence_sync and has_wait_sync are not logged, because missing
them already logs warnings.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2022-05-18 13:33:14 +03:00
parent 2f115047de
commit e884e7c7b8
2 changed files with 21 additions and 6 deletions

View File

@ -31,6 +31,7 @@
#include "shared/helpers.h"
#include "shared/platform.h"
#include "shared/string-helpers.h"
#include "gl-renderer.h"
#include "gl-renderer-internal.h"
@ -743,5 +744,25 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
"to missing EGL_KHR_wait_sync extension\n");
}
weston_log("EGL features:\n");
weston_log_continue(STAMP_SPACE "EGL Wayland extension: %s\n",
yesno(gr->has_bind_display));
weston_log_continue(STAMP_SPACE "context priority: %s\n",
yesno(gr->has_context_priority));
weston_log_continue(STAMP_SPACE "buffer age: %s\n",
yesno(gr->has_egl_buffer_age));
weston_log_continue(STAMP_SPACE "partial update: %s\n",
yesno(gr->has_egl_partial_update));
weston_log_continue(STAMP_SPACE "swap buffers with damage: %s\n",
yesno(gr->swap_buffers_with_damage));
weston_log_continue(STAMP_SPACE "configless context: %s\n",
yesno(gr->has_configless_context));
weston_log_continue(STAMP_SPACE "surfaceless context: %s\n",
yesno(gr->has_surfaceless_context));
weston_log_continue(STAMP_SPACE "dmabuf support: %s\n",
gr->has_dmabuf_import ?
(gr->has_dmabuf_import_modifiers ? "modifiers" : "legacy") :
"no");
return 0;
}

View File

@ -3750,12 +3750,8 @@ gl_renderer_display_create(struct weston_compositor *ec,
wl_list_init(&gr->dmabuf_formats);
if (gr->has_surfaceless_context) {
weston_log("EGL_KHR_surfaceless_context available\n");
gr->dummy_surface = EGL_NO_SURFACE;
} else {
weston_log("EGL_KHR_surfaceless_context unavailable. "
"Trying PbufferSurface\n");
if (gl_renderer_create_pbuffer_surface(gr) < 0)
goto fail_with_error;
}
@ -4001,8 +3997,6 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
weston_log("GL ES %d.%d - renderer features:\n",
gr_gl_version_major(gr->gl_version),
gr_gl_version_minor(gr->gl_version));
weston_log_continue(STAMP_SPACE "EGL Wayland extension: %s\n",
gr->has_bind_display ? "yes" : "no");
weston_log_continue(STAMP_SPACE "read-back format: %s\n",
ec->read_format == PIXMAN_a8r8g8b8 ? "BGRA" : "RGBA");
weston_log_continue(STAMP_SPACE "wl_shm 10 bpc formats: %s\n",