Mesa (master): egl_dri2: Fix a typo that make glFlush be called at wrong time.

Chia-I Wu olv at kemper.freedesktop.org
Tue Oct 26 07:04:49 UTC 2010


Module: Mesa
Branch: master
Commit: 547e7619aac74ae13bdaa7fdf403a4ceb5212467
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=547e7619aac74ae13bdaa7fdf403a4ceb5212467

Author: Chia-I Wu <olv at lunarg.com>
Date:   Tue Oct 26 15:00:56 2010 +0800

egl_dri2: Fix a typo that make glFlush be called at wrong time.

We want to call glFlush when there is a current context.  That is,
old_ctx.  This is a regression introduced by
d19afc57fe49816f3f3290410e0124d326577be2.

---

 src/egl/drivers/dri2/egl_dri2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index a5f95b9..51834d7 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1197,7 +1197,7 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
       return EGL_FALSE;
 
    /* flush before context switch */
-   if (ctx && dri2_drv->glFlush)
+   if (old_ctx && dri2_drv->glFlush)
       dri2_drv->glFlush();
 
    ddraw = (dri2_dsurf) ? dri2_dsurf->dri_drawable : NULL;




More information about the mesa-commit mailing list