summaryrefslogtreecommitdiff
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
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.
-rw-r--r--configure.ac2
-rw-r--r--src/radeon_dri2.c22
2 files changed, 15 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 48375ee..66f76aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,7 +140,7 @@ if test "$DRI" = yes; then
AC_CHECK_HEADER(xf86drmMode.h,[DRM_MODE=yes],[DRM_MODE=no],[#include <stdint.h>
#include <stdlib.h>])
if test "x$DRM_MODE" = xyes; then
- PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6 libdrm_radeon],
+ PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6.2 libdrm_radeon],
[LIBDRM_RADEON=yes], [LIBDRM_RADEON=no])
if test "x$LIBDRM_RADEON" = xyes; then
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 613fde8..051cc78 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;