diff options
author | Keith Packard <keithp@keithp.com> | 2009-07-06 13:49:31 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-07-06 13:50:34 -0700 |
commit | 705042f497b7b3843c2dcc5c160fb8dfeac1472a (patch) | |
tree | 65392a037f632b790e611e162b96158e71ce5181 /src/i830_dri.c | |
parent | 2ebc7d32e47b5edd5b776c39f936ed4e053caac2 (diff) |
Handle DRI2INFOREC version 3
This DRI2 version does not support the old CreateBuffers/DestroyBuffers
interface anymore.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/i830_dri.c')
-rw-r--r-- | src/i830_dri.c | 10 |
1 files 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; |