[Mesa-dev] [PATCH 02/13] egl: initialize SyncCondition after attr parsing

Chad Versace chad.versace at intel.com
Sat Jul 9 00:00:52 UTC 2016


From: Rob Clark <robclark at freedesktop.org>

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 at freedesktop.org>
---
 src/egl/main/eglsync.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c
index eb56655..becb57d 100644
--- a/src/egl/main/eglsync.c
+++ b/src/egl/main/eglsync.c
@@ -100,19 +100,19 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
    sync->Type = type;
    sync->SyncStatus = EGL_UNSIGNALED_KHR;
 
-   switch (type) {
-   case EGL_SYNC_CL_EVENT_KHR:
-      sync->SyncCondition = EGL_SYNC_CL_EVENT_COMPLETE_KHR;
-      break;
-   default:
-      sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR;
-   }
-
    if (attrib_list64)
       err = _eglParseSyncAttribList64(sync, attrib_list64);
    else
       err = _eglParseSyncAttribList(sync, attrib_list);
 
+   switch (type) {
+   case EGL_SYNC_CL_EVENT_KHR:
+      sync->SyncCondition = EGL_SYNC_CL_EVENT_COMPLETE_KHR;
+      break;
+   default:
+      sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR;
+   }
+
    if (err != EGL_SUCCESS)
       return _eglError(err, "eglCreateSyncKHR");
 
-- 
2.9.0.rc2



More information about the mesa-dev mailing list