summaryrefslogtreecommitdiff
path: root/src/sna/sna_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/sna_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/sna_render.c')
-rw-r--r--src/sna/sna_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 3e935d57..bba7c942 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -60,7 +60,7 @@ sna_format_for_depth(int depth)
case 16: return PICT_r5g6b5;
default: assert(0);
case 24: return PICT_x8r8g8b8;
-#ifdef PICT_x2r10g10b10
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,900,0)
case 30: return PICT_x2r10g10b10;
#endif
case 32: return PICT_a8r8g8b8;