dri glx: Swap before checking for cliprects.
authorYounes Manton <younes.m@gmail.com>
Tue, 14 Apr 2009 01:24:44 +0000 (21:24 -0400)
committerYounes Manton <younes.m@gmail.com>
Tue, 14 Apr 2009 01:34:53 +0000 (21:34 -0400)
We don't update drawables anymore unless they are completely
uninitialized, so we need to swap even if we don't have
cliprects yet, otherwise we never end up calling the driver's
SwapBuffers(). The driver should update the drawable in its
SwapBuffers() anyway.

See 8e753d04045a82062ac34d3b2622eb9dba8af374,
"dri glx: Fix dri_util::driBindContext" for the change that
exposed it.

src/mesa/drivers/dri/common/dri_util.c

index 38c2e7b00d19d29c157137dd7404c83e50ee7e1f..f620c2600074de397fcfb5b263e4e2296ed4270c 100644 (file)
@@ -311,12 +311,12 @@ static void driSwapBuffers(__DRIdrawable *dPriv)
     __DRIscreen *psp = dPriv->driScreenPriv;
     drm_clip_rect_t *rects;
     int i;
-    
-    if (!dPriv->numClipRects)
-        return;
 
     psp->DriverAPI.SwapBuffers(dPriv);
 
+    if (!dPriv->numClipRects)
+        return;
+
     rects = _mesa_malloc(sizeof(*rects) * dPriv->numClipRects);
 
     if (!rects)