diff options
author | Dave Airlie <airlied@gmail.com> | 2012-09-04 18:17:06 +1000 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-09-04 18:17:06 +1000 |
commit | bd0e9c51407cb99f1fe4f0acfedc37ee0c354040 (patch) | |
tree | 67fb157a6da703e02fbb26846558b5a5b0778e46 /src/radeon_dri2.c | |
parent | 75c1f62f44d7b3709c1fa103d59733866967b841 (diff) |
radeon/dri2: fix build against older servers.
Older servers won't have DRI2UpdatePrime, so fix build.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54433
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r-- | src/radeon_dri2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index f6f5fd5f..02fe66d4 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -63,6 +63,10 @@ #define USE_DRI2_SCHEDULING #endif +#if DRI2INFOREC_VERSION >= 9 +#define USE_DRI2_PRIME +#endif + #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,0, 0) typedef DRI2BufferPtr BufferPtr; #else @@ -578,6 +582,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen, src_drawable = drawable; } if (dst_private->attachment == DRI2BufferFrontLeft) { +#ifdef USE_DRI2_PRIME if (drawable->pScreen != pScreen) { dst_drawable = DRI2UpdatePrime(drawable, dest_buffer); if (!dst_drawable) @@ -586,6 +591,7 @@ radeon_dri2_copy_region2(ScreenPtr pScreen, if (dst_drawable != drawable) translate = TRUE; } else +#endif dst_drawable = drawable; } |