gl-renderer: pass gr to gl_renderer_log_extensions()

Plumb struct gl_renderer all the way through to
gl_renderer_log_extensions(). In the future, the extension lists will be
printed into a debug scope specifically, and it will get the debug scope
from gr.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 3 years ago
parent 2327daf96b
commit ccb0d4f7ce
  1. 5
      libweston/renderer-gl/egl-glue.c
  2. 3
      libweston/renderer-gl/gl-renderer-internal.h
  3. 15
      libweston/renderer-gl/gl-renderer.c

@ -477,7 +477,7 @@ gl_renderer_set_egl_device(struct gl_renderer *gr)
return; 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 */ /* 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")) 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; return 0;
} }
gl_renderer_log_extensions("EGL client extensions", gl_renderer_log_extensions(gr, "EGL client extensions", extensions);
extensions);
if (weston_check_egl_extension(extensions, "EGL_EXT_device_query")) { if (weston_check_egl_extension(extensions, "EGL_EXT_device_query")) {
gr->query_display_attrib = gr->query_display_attrib =

@ -213,7 +213,8 @@ void
gl_renderer_print_egl_error_state(void); gl_renderer_print_egl_error_state(void);
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 void
log_egl_config_info(EGLDisplay egldpy, EGLConfig eglconfig); log_egl_config_info(EGLDisplay egldpy, EGLConfig eglconfig);

@ -3241,7 +3241,8 @@ gl_renderer_create_surface(struct weston_surface *surface)
} }
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)
{ {
const char *p, *end; const char *p, *end;
int l; int l;
@ -3264,7 +3265,7 @@ gl_renderer_log_extensions(const char *name, const char *extensions)
} }
static void static void
log_egl_info(EGLDisplay egldpy) log_egl_info(struct gl_renderer *gr, EGLDisplay egldpy)
{ {
const char *str; const char *str;
@ -3278,11 +3279,11 @@ log_egl_info(EGLDisplay egldpy)
weston_log("EGL client APIs: %s\n", str ? str : "(null)"); weston_log("EGL client APIs: %s\n", str ? str : "(null)");
str = eglQueryString(egldpy, EGL_EXTENSIONS); 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 static void
log_gl_info(void) log_gl_info(struct gl_renderer *gr)
{ {
const char *str; const char *str;
@ -3299,7 +3300,7 @@ log_gl_info(void)
weston_log("GL renderer: %s\n", str ? str : "(null)"); weston_log("GL renderer: %s\n", str ? str : "(null)");
str = (char *)glGetString(GL_EXTENSIONS); 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 static void
@ -3686,7 +3687,7 @@ gl_renderer_display_create(struct weston_compositor *ec,
weston_drm_format_array_init(&gr->supported_formats); 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; ec->renderer = &gr->base;
@ -3919,7 +3920,7 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
} }
gr->gl_version = get_gl_version(); gr->gl_version = get_gl_version();
log_gl_info(); log_gl_info(gr);
gr->image_target_texture_2d = gr->image_target_texture_2d =
(void *) eglGetProcAddress("glEGLImageTargetTexture2DOES"); (void *) eglGetProcAddress("glEGLImageTargetTexture2DOES");

Loading…
Cancel
Save