diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-10-02 10:38:14 +0800 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-10-22 09:33:27 -0600 |
commit | 60cf250d4705d5005399a53ab334fbc10b4bf9c4 (patch) | |
tree | 48be886d201acd003059bd4a4d2754572114dbd9 | |
parent | 7ffe64a7ae912974f9c2da43dd362cd832e2ba99 (diff) |
egl_glx: Add support for eglWaitClient and eglWaitNative.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
-rw-r--r-- | src/egl/drivers/glx/egl_glx.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index 71b26181c1..96292b0e9e 100644 --- a/src/egl/drivers/glx/egl_glx.c +++ b/src/egl/drivers/glx/egl_glx.c @@ -904,6 +904,21 @@ GLX_eglGetProcAddress(const char *procname) return (_EGLProc) glXGetProcAddress((const GLubyte *) procname); } +static EGLBoolean +GLX_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx) +{ + glXWaitGL(); + return EGL_TRUE; +} + +static EGLBoolean +GLX_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine) +{ + if (engine != EGL_CORE_NATIVE_ENGINE) + return _eglError(EGL_BAD_PARAMETER, "eglWaitNative"); + glXWaitX(); + return EGL_TRUE; +} static void GLX_Unload(_EGLDriver *drv) @@ -936,6 +951,8 @@ _eglMain(const char *args) GLX_drv->Base.API.DestroySurface = GLX_eglDestroySurface; GLX_drv->Base.API.SwapBuffers = GLX_eglSwapBuffers; GLX_drv->Base.API.GetProcAddress = GLX_eglGetProcAddress; + GLX_drv->Base.API.WaitClient = GLX_eglWaitClient; + GLX_drv->Base.API.WaitNative = GLX_eglWaitNative; GLX_drv->Base.Name = "GLX"; GLX_drv->Base.Unload = GLX_Unload; |