diff options
Diffstat (limited to 'lib/mesa/src/egl/main/eglsync.c')
-rw-r--r-- | lib/mesa/src/egl/main/eglsync.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/lib/mesa/src/egl/main/eglsync.c b/lib/mesa/src/egl/main/eglsync.c index cb931b816..dea324b11 100644 --- a/lib/mesa/src/egl/main/eglsync.c +++ b/lib/mesa/src/egl/main/eglsync.c @@ -55,19 +55,11 @@ _eglParseSyncAttribList(_EGLSync *sync, const EGLAttrib *attrib_list) case EGL_CL_EVENT_HANDLE_KHR: if (sync->Type == EGL_SYNC_CL_EVENT_KHR) { sync->CLEvent = val; - } else { - err = EGL_BAD_ATTRIBUTE; + break; } - break; - case EGL_SYNC_NATIVE_FENCE_FD_ANDROID: - if (sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID) { - /* we take ownership of the native fd, so no dup(): */ - sync->SyncFd = val; - } else { - err = EGL_BAD_ATTRIBUTE; - } - break; + /* fall through */ default: + (void) val; err = EGL_BAD_ATTRIBUTE; break; } @@ -91,24 +83,16 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type, _eglInitResource(&sync->Resource, sizeof(*sync), dpy); sync->Type = type; sync->SyncStatus = EGL_UNSIGNALED_KHR; - sync->SyncFd = EGL_NO_NATIVE_FENCE_FD_ANDROID; - - err = _eglParseSyncAttribList(sync, attrib_list); switch (type) { case EGL_SYNC_CL_EVENT_KHR: sync->SyncCondition = EGL_SYNC_CL_EVENT_COMPLETE_KHR; break; - case EGL_SYNC_NATIVE_FENCE_ANDROID: - if (sync->SyncFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) - sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR; - else - sync->SyncCondition = EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID; - break; default: sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR; } + err = _eglParseSyncAttribList(sync, attrib_list); if (err != EGL_SUCCESS) return _eglError(err, "eglCreateSyncKHR"); @@ -132,20 +116,17 @@ _eglGetSyncAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, if (sync->SyncStatus != EGL_SIGNALED_KHR && (sync->Type == EGL_SYNC_FENCE_KHR || sync->Type == EGL_SYNC_CL_EVENT_KHR || - sync->Type == EGL_SYNC_REUSABLE_KHR || - sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID)) + sync->Type == EGL_SYNC_REUSABLE_KHR)) drv->API.ClientWaitSyncKHR(drv, dpy, sync, 0, 0); *value = sync->SyncStatus; break; case EGL_SYNC_CONDITION_KHR: if (sync->Type != EGL_SYNC_FENCE_KHR && - sync->Type != EGL_SYNC_CL_EVENT_KHR && - sync->Type != EGL_SYNC_NATIVE_FENCE_ANDROID) + sync->Type != EGL_SYNC_CL_EVENT_KHR) return _eglError(EGL_BAD_ATTRIBUTE, "eglGetSyncAttribKHR"); *value = sync->SyncCondition; break; - default: return _eglError(EGL_BAD_ATTRIBUTE, "eglGetSyncAttribKHR"); break; |