[PATCH] glx: Compile fix to let server compile with new and old mesa

Kristian Høgsberg krh at bitplanet.net
Wed Feb 24 05:19:01 PST 2010


We broke the __DRI2_FLUSH API since it was never released, but since it's
taking a little longer than expected to get the X server side of the changes
ready, fix things up so it compiles.
---
 glx/glxdri2.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 0f998de..edd29b0 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -217,8 +217,15 @@ __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable *drawable)
     __GLXDRIscreen *screen = priv->screen;
     CARD64 unused;
 
+#if __DRI2_FLUSH_VERSION >= 3
+    if (screen->flush) {
+	(*screen->flush->flush)(priv->driDrawable);
+	(*screen->flush->invalidate)(priv->driDrawable);
+    }
+#else
     if (screen->flush)
 	(*screen->flush->flushInvalidate)(priv->driDrawable);
+#endif
 
     if (DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused,
 			__glXdriSwapEvent, drawable->pDraw) != Success)
-- 
1.6.5.rc2



More information about the xorg-devel mailing list