summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_android.c16
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c8
2 files changed, 17 insertions, 7 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 9581c9617d6..4f09b26e130 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -883,6 +883,14 @@ static struct dri2_egl_display_vtbl droid_display_vtbl = {
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
+static const __DRIdri2LoaderExtension droid_dri2_loader_extension = {
+ .base = { __DRI_DRI2_LOADER, 3 },
+
+ .getBuffers = NULL,
+ .flushFrontBuffer = droid_flush_front_buffer,
+ .getBuffersWithFormat = droid_get_buffers_with_format,
+};
+
static const __DRIimageLoaderExtension droid_image_loader_extension = {
.base = { __DRI_IMAGE_LOADER, 1 },
@@ -928,13 +936,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
/* 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 = NULL;
- dri2_dpy->dri2_loader_extension.flushFrontBuffer = droid_flush_front_buffer;
- dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
- droid_get_buffers_with_format;
- dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
+ dri2_dpy->extensions[0] = &droid_dri2_loader_extension.base;
} else {
dri2_dpy->extensions[0] = &droid_image_loader_extension.base;
}
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index b4653cc807b..797c013133a 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -265,6 +265,14 @@ surfaceless_get_buffers_with_format(__DRIdrawable * driDrawable,
return dri2_surf->buffers;
}
+static const __DRIdri2LoaderExtension droid_dri2_loader_extension = {
+ .base = { __DRI_DRI2_LOADER, 3 },
+
+ .getBuffers = NULL,
+ .flushFrontBuffer = droid_flush_front_buffer,
+ .getBuffersWithFormat = droid_get_buffers_with_format,
+};
+
static const __DRIimageLoaderExtension image_loader_extension = {
.base = { __DRI_IMAGE_LOADER, 1 },
.getBuffers = surfaceless_image_get_buffers,