From faff08edcbc06fda0495d8a4858007ff268b9d84 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 6 Apr 2010 18:05:25 -0400 Subject: [PATCH] dri2: Reverse invalidate and swapbuffer compatibility ordering. After bisecting a major jerkiness regression on my GM45 to commit 61d26bc82e7c4100a ("dri2: Event driven buffer validation."), I noticed that the patch reversed the ordering between the swapbuffers compatibility code and the invalidate compatibility code. Restoring the original ordering (swapbuffers followed by invalidate) fixes the stuttering problems. Fixes fdo bug #27277. Signed-off-by: Nick Bowler --- src/glx/dri2_glx.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index c4b5cb9..4f03caf 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -391,10 +391,6 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, (*pdraw->psc->f->flush)(pdraw->driDrawable); #endif - /* Old servers don't send invalidate events */ - if (!pdp->invalidateAvailable) - dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); - /* Old servers can't handle swapbuffers */ if (!pdp->swapAvailable) { dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height); @@ -406,6 +402,10 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, remainder, &ret); #endif + /* Old servers don't send invalidate events */ + if (!pdp->invalidateAvailable) + dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); + return ret; } -- 1.6.4.4