egl: Drop duplicate check on EGLSync type
authorChad Versace <chadversary@chromium.org>
Tue, 27 Sep 2016 20:27:19 +0000 (13:27 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 4 Oct 2016 21:11:29 +0000 (14:11 -0700)
_eglInitSync checked that the display supported the sync type (such as
EGL_SYNC_FENCE), and did it wrong. When the check failed it emitted
EGL_BAD_ATTRIBUTE, but sometimes EGL_BAD_PARAMETER is needed.

_eglCreateSync already does the error checking, and it does it right.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/main/eglsync.c

index 6f779921caf6c16d21730bcf7bbf9f61728d2707..afb724f8314902e607e071ac4ad6f7d6b28dd1d0 100644 (file)
@@ -110,12 +110,6 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
 {
    EGLint err;
 
-   if (!(type == EGL_SYNC_REUSABLE_KHR && dpy->Extensions.KHR_reusable_sync) &&
-       !(type == EGL_SYNC_FENCE_KHR && dpy->Extensions.KHR_fence_sync) &&
-       !(type == EGL_SYNC_CL_EVENT_KHR && dpy->Extensions.KHR_cl_event2 &&
-         attrib_list64))
-      return _eglError(EGL_BAD_ATTRIBUTE, "eglCreateSyncKHR");
-
    _eglInitResource(&sync->Resource, sizeof(*sync), dpy);
    sync->Type = type;
    sync->SyncStatus = EGL_UNSIGNALED_KHR;