mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 03:20:09 +01:00
egl: return correct error for EGL_KHR_image_pixmap
EGL_KHR_image_pixmap says:
> If <target> is EGL_NATIVE_PIXMAP_KHR, and <ctx> is not EGL_NO_CONTEXT,
> the error EGL_BAD_PARAMETER is generated.
Reported-by: Rohan Garg <rohan@garg.io>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/166
Fixes: a1c4a8a3c8 "egl: Add support for EGL_KHR_image."
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/454>
This commit is contained in:
parent
84b47f0d26
commit
5db031bf3e
1 changed files with 7 additions and 0 deletions
|
|
@ -1865,6 +1865,13 @@ _eglCreateImageCommon(_EGLDisplay *disp, 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_NATIVE_PIXMAP_KHR, and <ctx> is not EGL_NO_CONTEXT,
|
||||
* the error EGL_BAD_PARAMETER is generated."
|
||||
*/
|
||||
if (target == EGL_NATIVE_PIXMAP_KHR && ctx != EGL_NO_CONTEXT)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
|
||||
|
||||
/* "If <target> is EGL_LINUX_DMA_BUF_EXT, <dpy> must be a valid display,
|
||||
* <ctx> must be EGL_NO_CONTEXT..."
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue