summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_surfaceless.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-08-24 23:32:27 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:42:22 +0100
commitf871946594129500a67c05a6d9fe99db54b4bb64 (patch)
treed608d3b7429b4b2328ea7843a884f238ba5f268c /src/egl/drivers/dri2/platform_surfaceless.c
parentf7b8108289fbef03ec465cf3b418eb65ff18d80d (diff)
egl/dri2: rework dri2_egl_display::extensions storage
Remove the error prone fixed size array. While we're here also rename to loader_extensions like in the GLX code. v2: Rebase. Keep image_loader_extension within the wayland_drm dri2_loader_extensions list. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/platform_surfaceless.c')
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index f613c03d3f0..386aa7ab7af 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -236,6 +236,13 @@ static const __DRIimageLoaderExtension image_loader_extension = {
#define DRM_RENDER_DEV_NAME "%s/renderD%d"
+static const __DRIextension *image_loader_extensions[] = {
+ &image_loader_extension.base,
+ &image_lookup_extension.base,
+ &use_invalidate.base,
+ NULL,
+};
+
EGLBoolean
dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
{
@@ -281,10 +288,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
goto cleanup_display;
}
- dri2_dpy->extensions[0] = &image_loader_extension.base;
- dri2_dpy->extensions[1] = &image_lookup_extension.base;
- dri2_dpy->extensions[2] = &use_invalidate.base;
- dri2_dpy->extensions[3] = NULL;
+ dri2_dpy->loader_extensions = image_loader_extensions;
if (!dri2_create_screen(disp)) {
err = "DRI2: failed to create screen";