diff options
author | Kristian Høgsberg <[email protected]> | 2013-03-19 13:20:36 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2013-03-19 16:13:38 -0400 |
commit | 1670737436adc5eea6af860bff5035b52dc6c303 (patch) | |
tree | c12a33164c96d0139486c3a48e43a81cb8318e07 /src/egl/drivers/dri2/egl_dri2.c | |
parent | 7c3d8301afed46cf932bf23431085de490a1f83a (diff) |
egl_dri2: Lower __DRI_IMAGE version requirement back to 1
We check the extension version manually instead and verify that we have
the createImageFromFds function before enabling prime fd passing.
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index a3aabf5ab51..06a21d758be 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -320,7 +320,7 @@ static struct dri2_extension_match dri2_driver_extensions[] = { static struct dri2_extension_match dri2_core_extensions[] = { { __DRI2_FLUSH, 1, offsetof(struct dri2_egl_display, flush) }, { __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) }, - { __DRI_IMAGE, 7, offsetof(struct dri2_egl_display, image) }, + { __DRI_IMAGE, 1, offsetof(struct dri2_egl_display, image) }, { NULL, 0, 0 } }; @@ -1573,7 +1573,9 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp, (int(*)(void *, uint32_t)) dri2_dpy->authenticate; ret = drmGetCap(dri2_dpy->fd, DRM_CAP_PRIME, &cap); - if (ret == 0 && cap == (DRM_PRIME_CAP_IMPORT | DRM_PRIME_CAP_EXPORT)) + if (ret == 0 && cap == (DRM_PRIME_CAP_IMPORT | DRM_PRIME_CAP_EXPORT) && + dri2_dpy->image->base.version >= 7 && + dri2_dpy->image->createImageFromFds != NULL) flags |= WAYLAND_DRM_PRIME; dri2_dpy->wl_server_drm = |