Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesa
authorJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 11 Jan 2010 20:23:29 +0000 (15:23 -0500)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 11 Jan 2010 20:23:29 +0000 (15:23 -0500)
Conflicts due to DRI1 removal:
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_screen.c

1  2 
configure.ac
progs/xdemos/glsync.c
src/glx/x11/dri_glx.c
src/glx/x11/glxcmds.c
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_context.h
src/mesa/drivers/dri/intel/intel_screen.c
src/mesa/drivers/dri/intel/intel_tex_image.c

diff --cc configure.ac
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -410,8 -443,11 +410,9 @@@ extern GLboolean intelInitContext(struc
                                    void *sharedContextPrivate,
                                    struct dd_function_table *functions);
  
 -extern void intelGetLock(struct intel_context *intel, GLuint flags);
 -
  extern void intelFinish(GLcontext * ctx);
  extern void intelFlush(GLcontext * ctx);
+ extern void intel_flush(GLcontext * ctx, GLboolean needs_mi_flush);
  
  extern void intelInitDriverFunctions(struct dd_function_table *functions);
  
@@@ -113,10 -236,40 +113,36 @@@ static const __DRItexBufferExtension in
     intelSetTexBuffer2,
  };
  
+ static void
+ intelDRI2Flush(__DRIdrawable *drawable)
+ {
+    struct intel_context *intel = drawable->driContextPriv->driverPrivate;
+    if (intel->gen < 4)
+       INTEL_FIREVERTICES(intel);
+    if (intel->batch->map != intel->batch->ptr)
+       intel_batchbuffer_flush(intel->batch);
+ }
+ static void
+ intelDRI2FlushInvalidate(__DRIdrawable *drawable)
+ {
+    intelDRI2Flush(drawable);
+    drawable->validBuffers = GL_FALSE;
+ }
+ static const struct __DRI2flushExtensionRec intelFlushExtension = {
+     { __DRI2_FLUSH, __DRI2_FLUSH_VERSION },
+     intelDRI2Flush,
+     intelDRI2FlushInvalidate,
+ };
  static const __DRIextension *intelScreenExtensions[] = {
      &driReadDrawableExtension,
 -    &driCopySubBufferExtension.base,
 -    &driSwapControlExtension.base,
 -    &driFrameTrackingExtension.base,
 -    &driMediaStreamCounterExtension.base,
      &intelTexOffsetExtension.base,
      &intelTexBufferExtension.base,
+     &intelFlushExtension.base,
      NULL
  };
  
@@@ -742,9 -749,10 +742,10 @@@ intelSetTexBuffer2(__DRIcontext *pDRICt
     if (!intelObj)
        return;
  
-    intel_update_renderbuffers(pDRICtx, dPriv);
+    if (!dPriv->validBuffers)
+       intel_update_renderbuffers(pDRICtx, dPriv);
  
 -   rb = intel_fb->color_rb[0];
 +   rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
     /* If the region isn't set, then intel_update_renderbuffers was unable
      * to get the buffers for the drawable.
      */