Revert "egl: return correct error for EGL_KHR_image_pixmap"

This reverts commit 5db031bf3e.

It crashes X after logging in on Ubuntu 20.04.

Fixes: 5db031bf3e - egl: return correct error for EGL_KHR_image_pixmap

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23740>
This commit is contained in:
Marek Olšák 2023-06-20 05:02:25 -04:00 committed by Marge Bot
parent 34163e19f7
commit 0823ab43c5

View file

@ -1865,13 +1865,6 @@ _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..."
*/