From 66d5ec5f3fbdc38d65ef185571eb7729c0dafb26 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Tue, 21 Feb 2017 23:56:46 +0000 Subject: [PATCH] eglapi: add entrypoint for eglClientWaitSyncKHR Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov --- src/egl/main/eglapi.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index e149c0f8d13..e44375a106a 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1762,16 +1762,13 @@ eglDestroySyncKHR(EGLDisplay dpy, EGLSync sync) } -EGLint EGLAPIENTRY -eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) +static EGLint +_eglClientWaitSyncCommon(_EGLDisplay *disp, EGLDisplay dpy, + _EGLSync *s, EGLint flags, EGLTime timeout) { - _EGLDisplay *disp = _eglLockDisplay(dpy); - _EGLSync *s = _eglLookupSync(sync, disp); _EGLDriver *drv; EGLint ret; - _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE); - _EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv); assert(disp->Extensions.KHR_reusable_sync || disp->Extensions.KHR_fence_sync || @@ -1800,6 +1797,26 @@ eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) RETURN_EGL_EVAL(disp, ret); } +EGLint EGLAPIENTRY +eglClientWaitSync(EGLDisplay dpy, EGLSync sync, + EGLint flags, EGLTime timeout) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLSync *s = _eglLookupSync(sync, disp); + _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE); + return _eglClientWaitSyncCommon(disp, dpy, s, flags, timeout); +} + +static EGLint EGLAPIENTRY +eglClientWaitSyncKHR(EGLDisplay dpy, EGLSync sync, + EGLint flags, EGLTime timeout) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLSync *s = _eglLookupSync(sync, disp); + _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE); + return _eglClientWaitSyncCommon(disp, dpy, s, flags, timeout); +} + static EGLint _eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags) @@ -2393,7 +2410,7 @@ eglGetProcAddress(const char *procname) { "eglCreateSyncKHR", (_EGLProc) eglCreateSyncKHR }, { "eglCreateSync64KHR", (_EGLProc) eglCreateSync64KHR }, { "eglDestroySyncKHR", (_EGLProc) eglDestroySyncKHR }, - { "eglClientWaitSyncKHR", (_EGLProc) eglClientWaitSync }, + { "eglClientWaitSyncKHR", (_EGLProc) eglClientWaitSyncKHR }, { "eglWaitSyncKHR", (_EGLProc) eglWaitSyncKHR }, { "eglSignalSyncKHR", (_EGLProc) eglSignalSyncKHR }, { "eglGetSyncAttribKHR", (_EGLProc) eglGetSyncAttribKHR }, -- 2.30.2