From: Adam Jackson Date: Tue, 16 Aug 2022 01:46:19 +0000 (-0400) Subject: egl: Remove some can't-happen supported API checks X-Git-Tag: upstream/22.3.5~4097 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dae8f76245780c3118333d2e4e22974da0c26e12;p=platform%2Fupstream%2Fmesa.git egl: Remove some can't-happen supported API checks The only other thing this could be is OpenVG, which we never create. Reviewed-by: Eric Engestrom Part-of: --- diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index de2c53e..13f0553 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1859,10 +1859,7 @@ _eglCreateSync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list, (type == EGL_SYNC_FENCE_KHR || type == EGL_SYNC_NATIVE_FENCE_ANDROID)) RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SYNC_KHR); - /* return an error if the client API doesn't support GL_[OES|MESA]_EGL_sync. */ - if (ctx && (ctx->Resource.Display != disp || - (ctx->ClientAPI != EGL_OPENGL_ES_API && - ctx->ClientAPI != EGL_OPENGL_API))) + if (ctx && (ctx->Resource.Display != disp)) RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SYNC_KHR); switch (type) { @@ -2041,10 +2038,7 @@ _eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags) _EGL_CHECK_SYNC(disp, s, EGL_FALSE); assert(disp->Extensions.KHR_wait_sync); - /* return an error if the client API doesn't support GL_[OES|MESA]_EGL_sync. */ - if (ctx == EGL_NO_CONTEXT || - (ctx->ClientAPI != EGL_OPENGL_ES_API && - ctx->ClientAPI != EGL_OPENGL_API)) + if (ctx == EGL_NO_CONTEXT) RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_FALSE); /* the API doesn't allow any flags yet */ @@ -2787,9 +2781,7 @@ _eglLockDisplayInterop(EGLDisplay dpy, EGLContext context, } *ctx = _eglLookupContext(context, *disp); - if (!*ctx || - ((*ctx)->ClientAPI != EGL_OPENGL_API && - (*ctx)->ClientAPI != EGL_OPENGL_ES_API)) { + if (!*ctx) { _eglUnlockDisplay(*disp); return MESA_GLINTEROP_INVALID_CONTEXT; }