]> git.draconx.ca Git - gentoo-draconx.git/blob - media-libs/mesa/files/0001-dri2-Delete-invalidate-compatibility-code.patch
f185a92c196bc04835d46f5c0e945b2be90ff4c8
[gentoo-draconx.git] / media-libs / mesa / files / 0001-dri2-Delete-invalidate-compatibility-code.patch
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.
5
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.
10
11 Removing the code entirely solves the issue.
12
13 Fixes fdo bug #27277.
14
15 Signed-off-by: Nick Bowler <nbowler@draconx.ca>
16 ---
17  src/glx/dri2_glx.c |   10 ----------
18  1 files changed, 0 insertions(+), 10 deletions(-)
19
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
25     int driMinor;
26     int driPatch;
27     int swapAvailable;
28 -   int invalidateAvailable;
29  };
30  
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;
35  
36 -   /* Old servers don't send invalidate events */
37 -   if (!pdp->invalidateAvailable)
38 -       dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable);
39 -
40     dri2WaitGL(loaderPrivate);
41  }
42  
43 @@ -391,10 +386,6 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
44         (*pdraw->psc->f->flush)(pdraw->driDrawable);
45  #endif
46  
47 -    /* Old servers don't send invalidate events */
48 -    if (!pdp->invalidateAvailable)
49 -       dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable);
50 -
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)
55  
56     pdp->driPatch = 0;
57     pdp->swapAvailable = (pdp->driMinor >= 2);
58 -   pdp->invalidateAvailable = (pdp->driMinor >= 3);
59  
60     pdp->base.destroyDisplay = dri2DestroyDisplay;
61     pdp->base.createScreen = dri2CreateScreen;
62 -- 
63 1.6.4.4
64