diff options
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 4a9831bc7f1..96c9e06c4ab 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1344,6 +1344,11 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR); if (!context && ctx != EGL_NO_CONTEXT) RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR); + /* "If <target> is EGL_LINUX_DMA_BUF_EXT, <dpy> must be a valid display, + * <ctx> must be EGL_NO_CONTEXT..." + */ + if (ctx != EGL_NO_CONTEXT && target == EGL_LINUX_DMA_BUF_EXT) + RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR); img = drv->API.CreateImageKHR(drv, disp, context, target, buffer, attr_list); |