glx: Don't try to swap a front buffer if we don't have one.
authorEric Anholt <eric@anholt.net>
Fri, 23 Jul 2010 20:41:13 +0000 (13:41 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 23 Jul 2010 20:59:22 +0000 (13:59 -0700)
Fixes glean glsl1 since 7b7845a076c933e096ac511b4184141ba194449a

src/glx/dri2_glx.c

index 2f12387860eee93c73a3e3288d2a4793604ff4d4..ae5bf535afb35b50c00e296b4c96c164b2b58ec9 100644 (file)
@@ -423,12 +423,13 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
    struct dri2_drawable *pdraw = loaderPrivate;
    __GLXdisplayPrivate *priv = __glXInitialize(pdraw->base.psc->dpy);
    struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
+   GLXContext gc = __glXGetCurrentContext();
 
    /* Old servers don't send invalidate events */
    if (!pdp->invalidateAvailable)
        dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable);
 
-   dri2_copy_drawable(pdraw, DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft);
+   dri2_wait_gl(gc);
 }