From c8327cc115997275f701993a7edbcbf42b08912b Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Fri, 30 Apr 2010 18:14:20 -0400 Subject: [PATCH v3] dri2: Fix compatibility with old servers. Commit 61d26bc82e7c4100a ("dri2: Event driven buffer validation.") introduced code to handle "old" servers which do not support invalidate events (i.e. 1.8.0). However, the compatibility code causes severe stuttering on my GM45 with "older" servers that do not support swap events (i.e. 1.7.6). It seems that the solution is to only run the compatibility code when swap events are supported. Fixes fdo bug #27277. Signed-off-by: Nick Bowler --- src/glx/dri2_glx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 6058c72..5516324 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -364,7 +364,7 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate) __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)priv->dri2Display; /* Old servers don't send invalidate events */ - if (!pdp->invalidateAvailable) + if (pdp->swapAvailable && !pdp->invalidateAvailable) dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable); dri2WaitGL(loaderPrivate); @@ -428,7 +428,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, #endif /* Old servers don't send invalidate events */ - if (!pdp->invalidateAvailable) + if (pdp->swapAvailable && !pdp->invalidateAvailable) dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); /* Old servers can't handle swapbuffers */ -- 1.6.4.4