summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-08-16 18:21:48 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:41:51 +0100
commitd2d579da7e1ebd7bc33e7c84921eedc8b8208cda (patch)
treea2ababfa119d77e65391a5d802087215f3ac9b2c /src/egl
parent31ef5d4452a208ca13e26f0646f37b25c2a2eb26 (diff)
egl/wayland: don't populate dri2_dpy->dri2_loader_extension
Analogous to the earlier android patch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c16
1 files 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;