From f871946594129500a67c05a6d9fe99db54b4bb64 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 24 Aug 2016 23:32:27 +0100 Subject: 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 Reviewed-by: Eric Engestrom --- src/egl/drivers/dri2/platform_surfaceless.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/egl/drivers/dri2/platform_surfaceless.c') 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"; -- cgit v1.2.3