summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-09-15 12:40:54 +0800
committerChia-I Wu <olvaffe@gmail.com>2009-09-15 12:41:16 +0800
commitb4b8800315637d9218a81c76f09df7d601710d29 (patch)
treec76bbe1ab63134e286816cebf89c9381ceba0f4f
parent4e5934fed17373e55bd2bac6a35632734beeab30 (diff)
egl_xdri: Check that FlushCurrentContext is available.
-rw-r--r--src/egl/drivers/xdri/egl_xdri.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c
index 682a2c3a31..9793e4f8b4 100644
--- a/src/egl/drivers/xdri/egl_xdri.c
+++ b/src/egl/drivers/xdri/egl_xdri.c
@@ -626,7 +626,8 @@ xdri_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw)
struct xdri_egl_surface *xdri_surf = lookup_surface(draw);
/* swapBuffers does not flush commands */
- if (draw == _eglGetCurrentSurface(EGL_DRAW))
+ if (draw == _eglGetCurrentSurface(EGL_DRAW) &&
+ xdri_driver->FlushCurrentContext)
xdri_driver->FlushCurrentContext();
xdri_dpy->psc->driScreen->swapBuffers(xdri_surf->driDrawable);