summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-02-24 10:37:26 -0500
committerKeith Packard <keithp@keithp.com>2010-02-24 09:16:46 -0800
commit018b177591c9fade6d065e31858cc6e054d33eff (patch)
tree44ffbccbe138640715007c1f7852e15bf98303e8
parentdb4f676f25c6d8e58263d5151942be730592d444 (diff)
glx: Compile fix to let server compile with new and old mesa
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. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--glx/glxdri2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 0f998de75..edd29b0e1 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)