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 <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18128>
This commit is contained in:
+3
-11
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user