]> git.draconx.ca Git - gentoo-draconx.git/blob - media-libs/mesa/files/0001-dri2-Fix-compatibility-with-old-servers.patch
xorg-server: Version bump to 1.8.1 + DontLie.
[gentoo-draconx.git] / media-libs / mesa / files / 0001-dri2-Fix-compatibility-with-old-servers.patch
1 From c8327cc115997275f701993a7edbcbf42b08912b Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
3 Date: Fri, 30 Apr 2010 18:14:20 -0400
4 Subject: [PATCH v3] dri2: Fix compatibility with old servers.
5
6 Commit 61d26bc82e7c4100a ("dri2: Event driven buffer validation.")
7 introduced code to handle "old" servers which do not support invalidate
8 events (i.e. 1.8.0).  However, the compatibility code causes severe
9 stuttering on my GM45 with "older" servers that do not support swap
10 events (i.e. 1.7.6).  It seems that the solution is to only run the
11 compatibility code when swap events are supported.
12
13 Fixes fdo bug #27277.
14
15 Signed-off-by: Nick Bowler <nbowler@draconx.ca>
16 ---
17  src/glx/dri2_glx.c |    4 ++--
18  1 files changed, 2 insertions(+), 2 deletions(-)
19
20 diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
21 index 6058c72..5516324 100644
22 --- a/src/glx/dri2_glx.c
23 +++ b/src/glx/dri2_glx.c
24 @@ -364,7 +364,7 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
25     __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)priv->dri2Display;
26  
27     /* Old servers don't send invalidate events */
28 -   if (!pdp->invalidateAvailable)
29 +   if (pdp->swapAvailable && !pdp->invalidateAvailable)
30         dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable);
31  
32     dri2WaitGL(loaderPrivate);
33 @@ -428,7 +428,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
34  #endif
35  
36      /* Old servers don't send invalidate events */
37 -    if (!pdp->invalidateAvailable)
38 +    if (pdp->swapAvailable && !pdp->invalidateAvailable)
39         dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable);
40  
41      /* Old servers can't handle swapbuffers */
42 -- 
43 1.6.4.4
44