egl: initialize SyncCondition after attr parsing

Reduce the noise in the next patch.  For EGL_SYNC_NATIVE_FENCE_ANDROID
the sync condition is conditional on EGL_SYNC_NATIVE_FENCE_FD_ANDROID
attribute.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
This commit is contained in:
Rob Clark 2016-11-18 08:39:30 -05:00 committed by Chad Versace
parent 05f35a868c
commit cce04a4630

View file

@ -84,6 +84,8 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
sync->Type = type;
sync->SyncStatus = EGL_UNSIGNALED_KHR;
err = _eglParseSyncAttribList(sync, attrib_list);
switch (type) {
case EGL_SYNC_CL_EVENT_KHR:
sync->SyncCondition = EGL_SYNC_CL_EVENT_COMPLETE_KHR;
@ -92,7 +94,6 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR;
}
err = _eglParseSyncAttribList(sync, attrib_list);
if (err != EGL_SUCCESS)
return _eglError(err, "eglCreateSyncKHR");