GLX/DRI2: Fix build against Mesa 7.7.

Michel Dänzer michel at daenzer.net
Fri Mar 12 07:29:01 PST 2010


From: Michel Dänzer <daenzer at vmware.com>

Seems to work as well...

Signed-off-by: Michel Dänzer <daenzer at vmware.com>
---
 configure.ac  |    2 +-
 glx/glxdri2.c |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0579551..9660539 100644
--- a/configure.ac
+++ b/configure.ac
@@ -777,7 +777,7 @@ REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
 dnl List of libraries that require a specific version
 LIBAPPLEWM="applewm >= 1.4"
 LIBDMX="dmx >= 1.0.99.1"
-LIBDRI="dri >= 7.8.0"
+LIBDRI="dri >= 7.7.0"
 LIBDRM="libdrm >= 2.3.0"
 LIBGL="gl >= 7.1.0"
 LIBXEXT="xext >= 1.0.99.4"
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index edd29b0..863bd8a 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -213,19 +213,20 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust,
 static GLboolean
 __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable *drawable)
 {
+    CARD64 unused;
+#if __DRI2_FLUSH_VERSION >= 2
     __GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable;
     __GLXDRIscreen *screen = priv->screen;
-    CARD64 unused;
 
-#if __DRI2_FLUSH_VERSION >= 3
     if (screen->flush) {
+#if __DRI2_FLUSH_VERSION >= 3
 	(*screen->flush->flush)(priv->driDrawable);
 	(*screen->flush->invalidate)(priv->driDrawable);
-    }
 #else
-    if (screen->flush)
 	(*screen->flush->flushInvalidate)(priv->driDrawable);
 #endif
+    }
+#endif	/* __DRI2_FLUSH_VERSION >= 2 */
 
     if (DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused,
 			__glXdriSwapEvent, drawable->pDraw) != Success)
-- 
1.7.0



More information about the xorg-devel mailing list