diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-11 15:20:16 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-11 15:23:56 +0100 |
commit | 3d2b79098ccb3fed86be66f619f4ed338741d454 (patch) | |
tree | d24872db5b63aa1379c2fe269986f24aa5070665 | |
parent | 4fa35dd5e13a58070220f787fc0678f1c679808d (diff) |
dri: Rearrange code to compile against xorg-server-1.7
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel_dri.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 720820f3..a39b5125 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -398,14 +398,6 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer) #endif -static void I830DRI2ReferenceBuffer(DRI2Buffer2Ptr buffer) -{ - if (buffer) { - I830DRI2BufferPrivatePtr private = buffer->driverPrivate; - private->refcnt++; - } -} - static void I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion, DRI2BufferPtr destBuffer, DRI2BufferPtr sourceBuffer) @@ -553,6 +545,13 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion, #if DRI2INFOREC_VERSION >= 4 +static void I830DRI2ReferenceBuffer(DRI2Buffer2Ptr buffer) +{ + if (buffer) { + I830DRI2BufferPrivatePtr private = buffer->driverPrivate; + private->refcnt++; + } +} static int I830DRI2DrawablePipe(DrawablePtr pDraw) @@ -1291,9 +1290,9 @@ out_complete: DRI2WaitMSCComplete(client, draw, target_msc, 0, 0); return TRUE; } -#endif static int dri2_server_generation; +#endif Bool I830DRI2ScreenInit(ScreenPtr screen) { @@ -1321,6 +1320,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) return FALSE; } +#if DRI2INFOREC_VERSION >= 4 if (serverGeneration != dri2_server_generation) { dri2_server_generation = serverGeneration; if (!i830_dri2_register_frame_event_resource_types()) { @@ -1329,6 +1329,8 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) return FALSE; } } +#endif + intel->deviceName = drmGetDeviceNameFromFd(intel->drmSubFD); memset(&info, '\0', sizeof(info)); info.fd = intel->drmSubFD; |