aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2011-03-07 20:18:29 -0500
committerKristian Høgsberg <[email protected]>2011-03-26 10:57:31 -0400
commit981e338611699ed965966a161b7ba0aaa3e87ee0 (patch)
tree1661e46465da35ca2be84ec8c8f4e999050f8fea /src
parent56ef62d9885f805bbfb2243dc860ff425d5b4d3b (diff)
egl_dri2: Enable image extensions in one place
We know what we can support in egl_dri2.c so just enable the extensions there.
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c7
-rw-r--r--src/egl/drivers/dri2/platform_drm.c5
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c4
-rw-r--r--src/egl/drivers/dri2/platform_x11.c4
4 files changed, 7 insertions, 13 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f7e063b3524..e5dee555482 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -462,6 +462,13 @@ dri2_create_screen(_EGLDisplay *disp)
}
}
+ if (dri2_dpy->image) {
+ disp->Extensions.MESA_drm_image = EGL_TRUE;
+ disp->Extensions.KHR_image_base = EGL_TRUE;
+ disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
+ disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
+ }
+
return EGL_TRUE;
cleanup_dri_screen:
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index bd4fa80af59..9c6d3ddac22 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -708,11 +708,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
for (i = 0; dri2_dpy->driver_configs[i]; i++)
dri2_add_config(disp, dri2_dpy->driver_configs[i], i + 1, 0, 0, NULL);
- disp->Extensions.MESA_drm_image = EGL_TRUE;
- disp->Extensions.KHR_image_base = EGL_TRUE;
- disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
- disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
-
#ifdef HAVE_WAYLAND_PLATFORM
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
#endif
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 6ae3f6554b1..6969c137da8 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -677,11 +677,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
EGL_WINDOW_BIT | EGL_PIXMAP_BIT, NULL);
- disp->Extensions.MESA_drm_image = EGL_TRUE;
- disp->Extensions.KHR_image_base = EGL_TRUE;
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
- disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
- disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
dri2_dpy->authenticate = dri2_wayland_authenticate;
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index b3e60b8a115..30372caadcd 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1030,11 +1030,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
goto cleanup_configs;
}
- disp->Extensions.MESA_drm_image = EGL_TRUE;
- disp->Extensions.KHR_image_base = EGL_TRUE;
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
- disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
- disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
disp->Extensions.NOK_swap_region = EGL_TRUE;
disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;