diff options
author | Topi Pohjolainen <[email protected]> | 2013-03-22 14:31:01 +0200 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2013-08-02 08:56:03 +0300 |
commit | 0de013b61930505bbeaf094d079b566df18a0cf7 (patch) | |
tree | ba33b8c3b80932b4d42f297db0a117507d879589 /src/egl/main/eglapi.c | |
parent | 674dedc87a860f7aea41d5a37d8fd842e196dfdd (diff) |
egl: definitions for EXT_image_dma_buf_import
As specified in:
http://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
Checking for the valid fourcc values is left for drivers avoiding
dependency to drm header files here.
v2: enforce EGL_NO_CONTEXT
v3: declare the extension as EGL (not GLES)
v4: do not update eglext.h manually but rely on update from
Khronos instead
v5: (Eric) report invalid context as EGL_BAD_PARAMETER instead of as
EGL_BAD_CONTEXT
v6: (Chad) fix the checking for valid hints. Before all values were
rejected.
v7: (Chad) comment style change from
/**
* Multi-
* line
into
/* Multi-
* line
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
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); |