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

Author: Chia-I Wu <[email protected]>
Date:   Fri Jan 15 18:10:54 2010 +0800

st/egl_g3d: Avoid validation upon buffer swap or flush frontbuffer.

With screen->update_buffer being hooked, leave the job to the state
trackers.

---

 .../state_trackers/egl_g3d/common/egl_g3d.c        |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c 
b/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c
index d0c9755..51da8e1 100644
--- a/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl_g3d/common/egl_g3d.c
@@ -463,10 +463,8 @@ egl_g3d_flush_frontbuffer(struct pipe_screen *screen,
    struct egl_g3d_context *gctx = egl_g3d_context(context_private);
    struct egl_g3d_surface *gsurf = egl_g3d_surface(gctx->base.DrawSurface);
 
-   if (gsurf) {
+   if (gsurf)
       gsurf->native->flush_frontbuffer(gsurf->native);
-      egl_g3d_validate_context(gctx->base.Display, &gctx->base);
-   }
 }
 
 /**
@@ -857,9 +855,10 @@ egl_g3d_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, 
_EGLSurface *surf)
       struct egl_g3d_config *gconf = egl_g3d_config(gsurf->base.Config);
 
       /* force validation if the swap method is not copy */
-      if (gconf->native->mode.swapMethod != GLX_SWAP_COPY_OML)
+      if (gconf->native->mode.swapMethod != GLX_SWAP_COPY_OML) {
          gctx->force_validate = EGL_TRUE;
-      egl_g3d_validate_context(dpy, &gctx->base);
+         egl_g3d_validate_context(dpy, &gctx->base);
+      }
    }
 
    return EGL_TRUE;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to