From dae8f76245780c3118333d2e4e22974da0c26e12 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 15 Aug 2022 21:46:19 -0400 Subject: [PATCH] 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: --- src/egl/main/eglapi.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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; } -- 2.7.4