summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-08-16 18:44:19 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:42:02 +0100
commite7fcf1b09bfb41a91ba058e987ff7b399296e124 (patch)
tree412d2784ee752785ea96175411bed988cd416d1e /src/egl/drivers
parent2dbe14af1ea6b9d7af13a3067f52f844c658d412 (diff)
egl/x11: don't populate dri2_dpy->swrast_loader_extension
Analogous to earlier commits. Note: the actual version of the extension is 1, since it does not implement .putImage2. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 7d921f84ef9..211e5d904c0 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1159,6 +1159,14 @@ static struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
+static const __DRIswrastLoaderExtension swrast_loader_extension = {
+ .base = { __DRI_SWRAST_LOADER, 1 },
+
+ .getDrawableInfo = swrastGetDrawableInfo,
+ .putImage = swrastPutImage,
+ .getImage = swrastGetImage,
+};
+
static EGLBoolean
dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
{
@@ -1193,15 +1201,8 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
if (!dri2_load_driver_swrast(disp))
goto cleanup_conn;
- dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
- dri2_dpy->swrast_loader_extension.base.version = 2;
- dri2_dpy->swrast_loader_extension.getDrawableInfo = swrastGetDrawableInfo;
- dri2_dpy->swrast_loader_extension.putImage = swrastPutImage;
- dri2_dpy->swrast_loader_extension.getImage = swrastGetImage;
-
- dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
+ dri2_dpy->extensions[0] = &swrast_loader_extension.base;
dri2_dpy->extensions[1] = NULL;
- dri2_dpy->extensions[2] = NULL;
if (!dri2_create_screen(disp))
goto cleanup_driver;