summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_wayland.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2014-02-09 09:13:27 -0800
committerChad Versace <[email protected]>2014-03-17 15:39:23 -0700
commit9a40ee16d0be3a08ac2f467311673f4b9333191d (patch)
treec9d018f5f2e948b36de3942dd19758b4bfdab3fd /src/egl/drivers/dri2/platform_wayland.c
parent1787f5632fa40a67e29dc99dc4ff7515b169793b (diff)
egl/wayland: Emit EGL_BAD_PARAMETER for eglCreatePlatformPixmapSurface
From the EGL_EXT_wayland_spec, version 3: It is not valid to call eglCreatePlatformPixmapSurfaceEXT with a <dpy> that belongs to Wayland. Any such call fails and generates EGL_BAD_PARAMETER. Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/platform_wayland.c')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 85564661e92..691f3e1ef84 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -202,6 +202,22 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
return surf;
}
+static _EGLSurface *
+dri2_wl_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, void *native_window,
+ const EGLint *attrib_list)
+{
+ /* From the EGL_EXT_platform_wayland spec, version 3:
+ *
+ * It is not valid to call eglCreatePlatformPixmapSurfaceEXT with a <dpy>
+ * that belongs to Wayland. Any such call fails and generates
+ * EGL_BAD_PARAMETER.
+ */
+ _eglError(EGL_BAD_PARAMETER, "cannot create EGL pixmap surfaces on "
+ "Wayland");
+ return NULL;
+}
+
/**
* Called via eglDestroySurface(), drv->API.DestroySurface().
*/
@@ -936,7 +952,7 @@ dri2_wl_setup_swap_interval(struct dri2_egl_display *dri2_dpy)
static struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
.authenticate = dri2_wl_authenticate,
.create_window_surface = dri2_wl_create_window_surface,
- .create_pixmap_surface = dri2_fallback_create_pixmap_surface,
+ .create_pixmap_surface = dri2_wl_create_pixmap_surface,
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
.destroy_surface = dri2_wl_destroy_surface,
.create_image = dri2_create_image_khr,