summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-07-23 16:42:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-07-23 16:43:38 +0100
commit57f0e65d5186412835f282af59141626e4a87a00 (patch)
tree3095fa5388cce02c83f91db210bc486d9fd358b8 /src/sna/sna_dri2.c
parent4ed0937640b54246440421114b697f75d1b8c835 (diff)
sna/dri2: Compile fix for old xorg/dri2
We have to do conditional compilation as we touch structure members that may not exist in older Xserver headers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r--src/sna/sna_dri2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index e4f1c842..9388992d 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -3253,11 +3253,13 @@ bool sna_dri2_open(struct sna *sna, ScreenPtr screen)
driverNames[1] = info.driverName;
#endif
+#if DRI2INFOREC_VERSION >= 6
if (xorg_can_triple_buffer(sna)) {
info.version = 6;
info.SwapLimitValidate = sna_dri2_swap_limit_validate;
info.ReuseBufferNotify = sna_dri2_reuse_buffer;
}
+#endif
#if USE_ASYNC_SWAP
info.version = 10;