diff options
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglapi.c | 23 | ||||
-rw-r--r-- | src/egl/main/eglapi.h | 3 | ||||
-rw-r--r-- | src/egl/main/egldisplay.h | 2 | ||||
-rw-r--r-- | src/egl/main/eglmisc.c | 2 |
4 files changed, 30 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 219d8e61715..27d08027924 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1086,6 +1086,7 @@ eglGetProcAddress(const char *procname) { "eglGetPlatformDisplayEXT", (_EGLProc) eglGetPlatformDisplayEXT }, { "eglCreatePlatformWindowSurfaceEXT", (_EGLProc) eglCreatePlatformWindowSurfaceEXT }, { "eglCreatePlatformPixmapSurfaceEXT", (_EGLProc) eglCreatePlatformPixmapSurfaceEXT }, + { "eglGetSyncValuesCHROMIUM", (_EGLProc) eglGetSyncValuesCHROMIUM }, { NULL, NULL } }; EGLint i; @@ -1751,3 +1752,25 @@ eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, RETURN_EGL_EVAL(disp, ret); } + +EGLBoolean EGLAPIENTRY +eglGetSyncValuesCHROMIUM(EGLDisplay display, EGLSurface surface, + EGLuint64KHR *ust, EGLuint64KHR *msc, + EGLuint64KHR *sbc) +{ + _EGLDisplay *disp = _eglLockDisplay(display); + _EGLSurface *surf = _eglLookupSurface(surface, disp); + _EGLDriver *drv; + EGLBoolean ret; + + _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv); + if (!disp->Extensions.CHROMIUM_sync_control) + RETURN_EGL_EVAL(disp, EGL_FALSE); + + if (!ust || !msc || !sbc) + RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE); + + ret = drv->API.GetSyncValuesCHROMIUM(disp, surf, ust, msc, sbc); + + RETURN_EGL_EVAL(disp, ret); +} diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h index f20ce5b701b..cb01cab0c00 100644 --- a/src/egl/main/eglapi.h +++ b/src/egl/main/eglapi.h @@ -139,6 +139,8 @@ typedef EGLint (*QueryBufferAge_t)(_EGLDriver *drv, typedef EGLBoolean (*SwapBuffersWithDamageEXT_t) (_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, const EGLint *rects, EGLint n_rects); #endif +typedef EGLBoolean (*GetSyncValuesCHROMIUM_t) (_EGLDisplay *dpy, _EGLSurface *surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc); + /** * The API dispatcher jumps through these functions */ @@ -225,6 +227,7 @@ struct _egl_api PostSubBufferNV_t PostSubBufferNV; QueryBufferAge_t QueryBufferAge; + GetSyncValuesCHROMIUM_t GetSyncValuesCHROMIUM; }; #endif /* EGLAPI_INCLUDED */ diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index 970c21a9289..13b95327bc1 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -113,6 +113,8 @@ struct _egl_extensions EGLBoolean ANDROID_image_native_buffer; + EGLBoolean CHROMIUM_sync_control; + EGLBoolean NV_post_sub_buffer; EGLBoolean EXT_create_context_robustness; diff --git a/src/egl/main/eglmisc.c b/src/egl/main/eglmisc.c index 65669d8830f..388e4b51b7a 100644 --- a/src/egl/main/eglmisc.c +++ b/src/egl/main/eglmisc.c @@ -117,6 +117,8 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy) _EGL_CHECK_EXTENSION(ANDROID_image_native_buffer); + _EGL_CHECK_EXTENSION(CHROMIUM_sync_control); + _EGL_CHECK_EXTENSION(EXT_create_context_robustness); _EGL_CHECK_EXTENSION(EXT_buffer_age); _EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage); |