1 From 792e1d05c04a65d8cdabde131e28c5fbb700a609 Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
3 Date: Tue, 6 Apr 2010 18:05:25 -0400
4 Subject: [PATCH] dri2: Delete invalidate compatibility code.
6 Commit 61d26bc82e7c4100a ("dri2: Event driven buffer validation.")
7 introduced severe stuttering on my GM45 when using X server 1.7.
8 This appears to have been caused by the compatibility code added
9 to handle the case where the server does not emit invalidate events.
11 Removing the code entirely solves the issue.
15 Signed-off-by: Nick Bowler <nbowler@draconx.ca>
17 src/glx/dri2_glx.c | 10 ----------
18 1 files changed, 0 insertions(+), 10 deletions(-)
20 diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
21 index c4b5cb9..582e4a4 100644
22 --- a/src/glx/dri2_glx.c
23 +++ b/src/glx/dri2_glx.c
24 @@ -67,7 +67,6 @@ struct __GLXDRIdisplayPrivateRec
28 - int invalidateAvailable;
31 struct __GLXDRIcontextPrivateRec
32 @@ -327,10 +326,6 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
33 __GLXdisplayPrivate *priv = __glXInitialize(pdraw->base.psc->dpy);
34 __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)priv->dri2Display;
36 - /* Old servers don't send invalidate events */
37 - if (!pdp->invalidateAvailable)
38 - dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable);
40 dri2WaitGL(loaderPrivate);
43 @@ -391,10 +386,6 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
44 (*pdraw->psc->f->flush)(pdraw->driDrawable);
47 - /* Old servers don't send invalidate events */
48 - if (!pdp->invalidateAvailable)
49 - dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable);
51 /* Old servers can't handle swapbuffers */
52 if (!pdp->swapAvailable) {
53 dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
54 @@ -682,7 +673,6 @@ dri2CreateDisplay(Display * dpy)
57 pdp->swapAvailable = (pdp->driMinor >= 2);
58 - pdp->invalidateAvailable = (pdp->driMinor >= 3);
60 pdp->base.destroyDisplay = dri2DestroyDisplay;
61 pdp->base.createScreen = dri2CreateScreen;