summaryrefslogtreecommitdiff
path: root/src/radeon_dri2.c
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-08-28 17:05:44 +0300
committerMichel Dänzer <michel@daenzer.net>2009-08-30 13:20:50 +0200
commit3d6bf0f8cf128ee67d448491be44d345547b75c5 (patch)
tree2778e9b6e3bdd79184465a6a84a239ff5ae099e6 /src/radeon_dri2.c
parent6521dbf3884185ca5692d35d879d251890cc4f08 (diff)
radeon: Fix DRI2BufferPtr to be DRI2Buffer2Ptr for xserver 1.6.
Bump requirement for xserver in KMS mode to 1.6.2 for DRI2Buffer2Ptr.
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r--src/radeon_dri2.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 613fde82..051cc789 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -46,6 +46,12 @@
#define USE_DRI2_1_1_0
#endif
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,0, 0)
+typedef DRI2BufferPtr BufferPtr;
+#else
+typedef DRI2Buffer2Ptr BufferPtr;
+#endif
+
struct dri2_buffer_priv {
PixmapPtr pixmap;
unsigned int attachment;
@@ -53,13 +59,13 @@ struct dri2_buffer_priv {
#ifndef USE_DRI2_1_1_0
-static DRI2BufferPtr
+static BufferPtr
radeon_dri2_create_buffers(DrawablePtr drawable,
unsigned int *attachments,
int count)
{
ScreenPtr pScreen = drawable->pScreen;
- DRI2BufferPtr buffers;
+ BufferPtr buffers;
struct dri2_buffer_priv *privates;
PixmapPtr pixmap, depth_pixmap;
struct radeon_exa_pixmap_priv *driver_priv;
@@ -131,13 +137,13 @@ radeon_dri2_create_buffers(DrawablePtr drawable,
return buffers;
}
#else
-static DRI2BufferPtr
+static BufferPtr
radeon_dri2_create_buffer(DrawablePtr drawable,
unsigned int attachment,
unsigned int format)
{
ScreenPtr pScreen = drawable->pScreen;
- DRI2BufferPtr buffers;
+ BufferPtr buffers;
struct dri2_buffer_priv *privates;
PixmapPtr pixmap, depth_pixmap;
struct radeon_exa_pixmap_priv *driver_priv;
@@ -214,7 +220,7 @@ radeon_dri2_create_buffer(DrawablePtr drawable,
#ifndef USE_DRI2_1_1_0
static void
radeon_dri2_destroy_buffers(DrawablePtr drawable,
- DRI2BufferPtr buffers,
+ BufferPtr buffers,
int count)
{
ScreenPtr pScreen = drawable->pScreen;
@@ -232,7 +238,7 @@ radeon_dri2_destroy_buffers(DrawablePtr drawable,
}
#else
static void
-radeon_dri2_destroy_buffer(DrawablePtr drawable, DRI2BufferPtr buffers)
+radeon_dri2_destroy_buffer(DrawablePtr drawable, BufferPtr buffers)
{
if(buffers)
{
@@ -251,8 +257,8 @@ radeon_dri2_destroy_buffer(DrawablePtr drawable, DRI2BufferPtr buffers)
static void
radeon_dri2_copy_region(DrawablePtr drawable,
RegionPtr region,
- DRI2BufferPtr dest_buffer,
- DRI2BufferPtr src_buffer)
+ BufferPtr dest_buffer,
+ BufferPtr src_buffer)
{
struct dri2_buffer_priv *src_private = src_buffer->driverPrivate;
struct dri2_buffer_priv *dst_private = dest_buffer->driverPrivate;