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

Author: Kristian Høgsberg <[email protected]>
Date:   Fri Feb 19 14:08:35 2010 -0500

intel: Set buffer stamp before getting new buffers

This way, if we get an invalidate as we update the buffers, we
don't clobber the drawable stamp and ignore the invalidate.

Pointed-out-by: Francisco Jerez

---

 src/mesa/drivers/dri/intel/intel_context.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c 
b/src/mesa/drivers/dri/intel/intel_context.c
index 3a0830a..ced8d5a 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -206,6 +206,11 @@ intel_update_renderbuffers(__DRIcontext *context, 
__DRIdrawable *drawable)
    if (intel->is_front_buffer_rendering)
       intel_flush(&intel->ctx, GL_FALSE);
 
+   /* Set this up front, so that in case our buffers get invalidated
+    * while we're getting new buffers, we don't clobber the stamp and
+    * thus ignore the invalidate. */
+   drawable->lastStamp = drawable->dri2.stamp;
+
    if (INTEL_DEBUG & DEBUG_DRI)
       fprintf(stderr, "enter %s, drawable %p\n", __func__, drawable);
 
@@ -376,7 +381,6 @@ intel_update_renderbuffers(__DRIcontext *context, 
__DRIdrawable *drawable)
    }
 
    driUpdateFramebufferSize(&intel->ctx, drawable);
-   drawable->lastStamp = drawable->dri2.stamp;
 }
 
 void

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

Reply via email to