aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-08-05 00:25:48 +0100
committerEmil Velikov <[email protected]>2017-08-10 19:28:04 +0100
commitdf8efd5b74d45e2bfb977a92dcd3db86abd6b143 (patch)
treef32dc198e5c8d8ba5662135ec6b12176b5ad8fab /src/egl/main/eglapi.c
parent92b23683ebc839b13a565252cf13f5c2a715dcaa (diff)
egl: handle BAD_NATIVE_PIXMAP further up the stack
The basic (null) check is identical across all backends. Just move it to the top. v2: - Split the WINDOW vs PIXMAP into separate patches - Move check after the dpy and config - dEQP expects so Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 7f042181040..b3bcb1bac7d 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1021,6 +1021,9 @@ _eglCreatePixmapSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
if ((conf->SurfaceType & EGL_PIXMAP_BIT) == 0)
RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+ if (native_pixmap == NULL)
+ RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_NO_SURFACE);
+
surf = drv->API.CreatePixmapSurface(drv, disp, conf, native_pixmap,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;