summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-03-14 06:06:00 +1000
committerMarek Olšák <[email protected]>2018-03-16 13:19:45 -0400
commit7aeef2d4efdc809a698e9b983c8be8e4ccb27134 (patch)
tree600be5aa6efe62480995686d8c740ec6f58bbba7 /src/egl
parentf099c3aef1635f05f295969d296375fe9983a53a (diff)
dri3: allow building against older xcb (v3)
I'm not sure everyone wants to be updating their dri3 in a forced march setting, this allows a nicer approach, esp when you want to build on distro that aren't brand new. I'm sure there are plenty of ways this patch could be cleaner, and I've also not built it against an updated dri3. For meson I've just left it alone, since if you are using meson you probably don't mind xcb updates, and if you are using meson you can fix this better than me. v3: just don't put a version in for dri3/present without modifiers, should allow building with 1.11 as well (feel free to supply meson followups) Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_x11_dri3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index dce33561a6f..de60e952da8 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -327,6 +327,7 @@ dri3_create_image_khr_pixmap_from_buffers(_EGLDisplay *disp, _EGLContext *ctx,
EGLClientBuffer buffer,
const EGLint *attr_list)
{
+#ifdef HAVE_DRI3_MODIFIERS
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_image *dri2_img;
xcb_dri3_buffers_from_pixmap_cookie_t bp_cookie;
@@ -376,6 +377,9 @@ dri3_create_image_khr_pixmap_from_buffers(_EGLDisplay *disp, _EGLContext *ctx,
}
return &dri2_img->base;
+#else
+ return NULL;
+#endif
}
static _EGLImage *