summaryrefslogtreecommitdiff
path: root/src/sna/gen3_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-02-07 19:02:28 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-02-07 19:04:54 +0000
commit2d6af9e736c38a0f3dea89c448190ccbedfbcc13 (patch)
tree44cdbee94af71595a03e9d52bcfdd19670d4e97d /src/sna/gen3_render.c
parent781fd07e5518b21b5d910e0c58108a517903fda3 (diff)
sna: Switch from ifdef PICT_ to if XORG_VERSION_CURRENT
The PICT_ are enums and so never report true to ifdef PICT_a2r10g10b10 and instead we need to check the xserver version they were introduced. Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r--src/sna/gen3_render.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 4459a562..166635eb 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -108,7 +108,7 @@ static const struct formatinfo {
{PICT_x8r8g8b8, 0, MAPSURF_32BIT | MT_32BIT_XRGB8888, false},
{PICT_a8b8g8r8, 0, MAPSURF_32BIT | MT_32BIT_ABGR8888, false},
{PICT_x8b8g8r8, 0, MAPSURF_32BIT | MT_32BIT_XBGR8888, false},
-#ifdef PICT_a2r10g10b10
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,900,0)
{PICT_a2r10g10b10, PICT_x2r10g10b10, MAPSURF_32BIT | MT_32BIT_ARGB2101010, false},
{PICT_a2b10g10r10, PICT_x2b10g10r10, MAPSURF_32BIT | MT_32BIT_ABGR2101010, false},
#endif
@@ -208,7 +208,7 @@ static bool gen3_check_dst_format(uint32_t format)
case PICT_x1r5g5b5:
case PICT_a1b5g5r5:
case PICT_x1b5g5r5:
-#ifdef PICT_a2r10g10b10
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,900,0)
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a2b10g10r10:
@@ -233,7 +233,7 @@ static bool gen3_dst_rb_reversed(uint32_t format)
case PICT_r5g6b5:
case PICT_a1r5g5b5:
case PICT_x1r5g5b5:
-#ifdef PICT_a2r10g10b10
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,900,0)
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
#endif
@@ -267,7 +267,7 @@ static uint32_t gen3_get_dst_format(uint32_t format)
case PICT_a1b5g5r5:
case PICT_x1b5g5r5:
return BIAS | COLR_BUF_ARGB1555;
-#ifdef PICT_a2r10g10b10
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,900,0)
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a2b10g10r10:
@@ -322,7 +322,7 @@ static bool gen3_check_xformat(PicturePtr p)
case PICT_x1r5g5b5:
case PICT_a1b5g5r5:
case PICT_x1b5g5r5:
-#ifdef PICT_a2r10g10b10
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,900,0)
case PICT_a2r10g10b10:
case PICT_x2r10g10b10:
case PICT_a2b10g10r10: