summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2010-08-17 18:05:02 +0200
committerMatthias Hopf <mhopf@suse.de>2010-09-22 17:45:06 +0200
commitb84925b9c0842ba4dfa3481c09d3a80f84db4838 (patch)
tree7c448f30174e89b52ff5504b97b06ca65399e045
parent99f8d68d3dbc54fdd7de4a6df546cfa89422a0c2 (diff)
Make driver compile for 1.6 Xserver series again.
Signed-off-by: Matthias Hopf <mhopf@suse.de>
-rw-r--r--src/i915_render.c4
-rw-r--r--src/i965_render.c4
-rw-r--r--uxa/uxa-accel.c2
-rw-r--r--uxa/uxa-render.c8
4 files changed, 18 insertions, 0 deletions
diff --git a/src/i915_render.c b/src/i915_render.c
index f50b5c9b..fafdac5c 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -82,8 +82,10 @@ static struct formatinfo i915_tex_formats[] = {
{PICT_x8r8g8b8, MAPSURF_32BIT | MT_32BIT_XRGB8888},
{PICT_a8b8g8r8, MAPSURF_32BIT | MT_32BIT_ABGR8888},
{PICT_x8b8g8r8, MAPSURF_32BIT | MT_32BIT_XBGR8888},
+#if XORG_VERSION_CURRENT >= 10699900
{PICT_a2r10g10b10, MAPSURF_32BIT | MT_32BIT_ARGB2101010},
{PICT_a2b10g10r10, MAPSURF_32BIT | MT_32BIT_ABGR2101010},
+#endif
{PICT_r5g6b5, MAPSURF_16BIT | MT_16BIT_RGB565},
{PICT_a1r5g5b5, MAPSURF_16BIT | MT_16BIT_ARGB1555},
{PICT_a4r4g4b4, MAPSURF_16BIT | MT_16BIT_ARGB4444},
@@ -156,10 +158,12 @@ static Bool i915_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format)
case PICT_x1r5g5b5:
*dst_format = COLR_BUF_ARGB1555;
break;
+#if XORG_VERSION_CURRENT >= 10699900
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
*dst_format = COLR_BUF_ARGB2AAA;
break;
+#endif
case PICT_a8:
*dst_format = COLR_BUF_8BIT;
break;
diff --git a/src/i965_render.c b/src/i965_render.c
index 37a7ab73..15fbe498 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -117,10 +117,12 @@ static struct formatinfo i965_tex_formats[] = {
{PICT_r8g8b8, BRW_SURFACEFORMAT_R8G8B8_UNORM},
{PICT_r5g6b5, BRW_SURFACEFORMAT_B5G6R5_UNORM},
{PICT_a1r5g5b5, BRW_SURFACEFORMAT_B5G5R5A1_UNORM},
+#if XORG_VERSION_CURRENT >= 10699900
{PICT_a2r10g10b10, BRW_SURFACEFORMAT_B10G10R10A2_UNORM},
{PICT_x2r10g10b10, BRW_SURFACEFORMAT_B10G10R10X2_UNORM},
{PICT_a2b10g10r10, BRW_SURFACEFORMAT_R10G10B10A2_UNORM},
{PICT_x2r10g10b10, BRW_SURFACEFORMAT_B10G10R10X2_UNORM},
+#endif
{PICT_a4r4g4b4, BRW_SURFACEFORMAT_B4G4R4A4_UNORM},
};
@@ -169,10 +171,12 @@ static Bool i965_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format)
case PICT_x8b8g8r8:
*dst_format = BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
break;
+#if XORG_VERSION_CURRENT >= 10699900
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
*dst_format = BRW_SURFACEFORMAT_B10G10R10A2_UNORM;
break;
+#endif
case PICT_r5g6b5:
*dst_format = BRW_SURFACEFORMAT_B5G6R5_UNORM;
break;
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index a2ad6511..a5066c8e 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -47,7 +47,9 @@ format_for_depth(int depth)
case 16: return PICT_r5g6b5;
default:
case 24: return PICT_x8r8g8b8;
+#if XORG_VERSION_CURRENT >= 10699900
case 30: return PICT_x2r10g10b10;
+#endif
case 32: return PICT_a8r8g8b8;
}
}
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 3194d230..fd8eb939 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -108,6 +108,7 @@ op_to_string(CARD8 op)
/*
* Operators only available in version 0.2
*/
+#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 2
C(DisjointClear);
C(DisjointSrc);
C(DisjointDst);
@@ -133,10 +134,12 @@ op_to_string(CARD8 op)
C(ConjointAtop);
C(ConjointAtopReverse);
C(ConjointXor);
+#endif
/*
* Operators only available in version 0.11
*/
+#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 11
C(Multiply);
C(Screen);
C(Overlay);
@@ -152,6 +155,7 @@ op_to_string(CARD8 op)
C(HSLSaturation);
C(HSLColor);
C(HSLLuminosity);
+#endif
default: return "garbage";
#undef C
}
@@ -237,11 +241,13 @@ uxa_get_pixel_from_rgba(CARD32 * pixel,
gshift = rbits;
bshift = gshift + gbits;
ashift = bshift + bbits;
+#if XORG_VERSION_CURRENT >= 10699900
} else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
ashift = 0;
rshift = abits;
gshift = rshift + rbits;
bshift = gshift + gbits;
+#endif
} else {
return FALSE;
}
@@ -283,6 +289,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel,
gshift = rbits;
bshift = gshift + gbits;
ashift = bshift + bbits;
+#if XORG_VERSION_CURRENT >= 10699900
} else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
ashift = 0;
rshift = abits;
@@ -290,6 +297,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel,
rshift = PICT_FORMAT_BPP(format) - (rbits+gbits+bbits);
gshift = rshift + rbits;
bshift = gshift + gbits;
+#endif
} else {
return FALSE;
}