From d2d579da7e1ebd7bc33e7c84921eedc8b8208cda Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 16 Aug 2016 18:21:48 +0100 Subject: [PATCH] egl/wayland: don't populate dri2_dpy->dri2_loader_extension Analogous to the earlier android patch. Signed-off-by: Emil Velikov Reviewed-by: Eric Engestrom --- src/egl/drivers/dri2/platform_wayland.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 8daa2d397cd..c791f25e530 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -581,6 +581,14 @@ dri2_wl_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate) (void) loaderPrivate; } +static const __DRIdri2LoaderExtension dri2_loader_extension = { + .base = { __DRI_DRI2_LOADER, 3 }, + + .getBuffers = dri2_wl_get_buffers, + .flushFrontBuffer = dri2_wl_flush_front_buffer, + .getBuffersWithFormat = dri2_wl_get_buffers_with_format, +}; + static const __DRIimageLoaderExtension image_loader_extension = { .base = { __DRI_IMAGE_LOADER, 1 }, @@ -1141,13 +1149,7 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp) /* render nodes cannot use Gem names, and thus do not support * the __DRI_DRI2_LOADER extension */ if (!dri2_dpy->is_render_node) { - dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER; - dri2_dpy->dri2_loader_extension.base.version = 3; - dri2_dpy->dri2_loader_extension.getBuffers = dri2_wl_get_buffers; - dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_wl_flush_front_buffer; - dri2_dpy->dri2_loader_extension.getBuffersWithFormat = - dri2_wl_get_buffers_with_format; - dri2_dpy->extensions[3] = &dri2_dpy->dri2_loader_extension.base; + dri2_dpy->extensions[3] = &dri2_loader_extension.base; dri2_dpy->extensions[4] = NULL; } else dri2_dpy->extensions[3] = NULL; -- 2.30.2