Lines Matching full:sync
37 * Parse the list of sync attributes and return the proper error code.
40 _eglParseSyncAttribList(_EGLSync *sync, const EGLAttrib *attrib_list) in _eglParseSyncAttribList() argument
54 if (sync->Type == EGL_SYNC_CL_EVENT_KHR) { in _eglParseSyncAttribList()
55 sync->CLEvent = val; in _eglParseSyncAttribList()
61 if (sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID) { in _eglParseSyncAttribList()
63 sync->SyncFd = val; in _eglParseSyncAttribList()
74 _eglLog(_EGL_DEBUG, "bad sync attribute 0x%" PRIxPTR, attr); in _eglParseSyncAttribList()
83 _eglInitSync(_EGLSync *sync, _EGLDisplay *disp, EGLenum type, in _eglInitSync() argument
88 _eglInitResource(&sync->Resource, sizeof(*sync), disp); in _eglInitSync()
89 sync->Type = type; in _eglInitSync()
90 sync->SyncStatus = EGL_UNSIGNALED_KHR; in _eglInitSync()
91 sync->SyncFd = EGL_NO_NATIVE_FENCE_FD_ANDROID; in _eglInitSync()
93 err = _eglParseSyncAttribList(sync, attrib_list); in _eglInitSync()
97 sync->SyncCondition = EGL_SYNC_CL_EVENT_COMPLETE_KHR; in _eglInitSync()
100 if (sync->SyncFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) in _eglInitSync()
101 sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR; in _eglInitSync()
103 sync->SyncCondition = EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID; in _eglInitSync()
106 sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR; in _eglInitSync()
112 if (type == EGL_SYNC_CL_EVENT_KHR && !sync->CLEvent) in _eglInitSync()
119 _eglGetSyncAttrib(_EGLDisplay *disp, _EGLSync *sync, EGLint attribute, in _eglGetSyncAttrib() argument
124 *value = sync->Type; in _eglGetSyncAttrib()
127 /* update the sync status */ in _eglGetSyncAttrib()
128 if (sync->SyncStatus != EGL_SIGNALED_KHR && in _eglGetSyncAttrib()
129 (sync->Type == EGL_SYNC_FENCE_KHR || in _eglGetSyncAttrib()
130 sync->Type == EGL_SYNC_CL_EVENT_KHR || in _eglGetSyncAttrib()
131 sync->Type == EGL_SYNC_REUSABLE_KHR || in _eglGetSyncAttrib()
132 sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID)) in _eglGetSyncAttrib()
133 disp->Driver->ClientWaitSyncKHR(disp, sync, 0, 0); in _eglGetSyncAttrib()
135 *value = sync->SyncStatus; in _eglGetSyncAttrib()
138 if (sync->Type != EGL_SYNC_FENCE_KHR && in _eglGetSyncAttrib()
139 sync->Type != EGL_SYNC_CL_EVENT_KHR && in _eglGetSyncAttrib()
140 sync->Type != EGL_SYNC_NATIVE_FENCE_ANDROID) in _eglGetSyncAttrib()
142 *value = sync->SyncCondition; in _eglGetSyncAttrib()