From 705042f497b7b3843c2dcc5c160fb8dfeac1472a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 6 Jul 2009 13:49:31 -0700 Subject: Handle DRI2INFOREC version 3 This DRI2 version does not support the old CreateBuffers/DestroyBuffers interface anymore. Signed-off-by: Keith Packard --- src/i830_dri.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/i830_dri.c b/src/i830_dri.c index 31df642d..240c5196 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -415,16 +415,22 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen) info.driverName = IS_I965G(pI830) ? "i965" : "i915"; info.deviceName = p; -#ifdef USE_DRI2_1_1_0 +#if DRI2INFOREC_VERSION >= 3 + info.version = 3; + info.CreateBuffer = I830DRI2CreateBuffer; + info.DestroyBuffer = I830DRI2DestroyBuffer; +#else +# ifdef USE_DRI2_1_1_0 info.version = 2; info.CreateBuffers = NULL; info.DestroyBuffers = NULL; info.CreateBuffer = I830DRI2CreateBuffer; info.DestroyBuffer = I830DRI2DestroyBuffer; -#else +# else info.version = 1; info.CreateBuffers = I830DRI2CreateBuffers; info.DestroyBuffers = I830DRI2DestroyBuffers; +# endif #endif info.CopyRegion = I830DRI2CopyRegion; -- cgit v1.2.3