egl: advertise EGL_EXT_image_dma_buf_import_modifiers

v2: check for DRIimageExtension version 15 (Jason Ekstrand)

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Varad Gautam
2017-05-30 17:23:40 +05:30
committed by Eric Engestrom
parent de3c459bbd
commit 4c412293d0
2 changed files with 7 additions and 0 deletions

View File

@@ -726,6 +726,12 @@ dri2_setup_screen(_EGLDisplay *disp)
dri2_dpy->image->createImageFromDmaBufs) {
disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE;
}
if (dri2_dpy->image->base.version >= 15 &&
dri2_dpy->image->createImageFromDmaBufs2 &&
dri2_dpy->image->queryDmaBufFormats &&
dri2_dpy->image->queryDmaBufModifiers) {
disp->Extensions.EXT_image_dma_buf_import_modifiers = EGL_TRUE;
}
#endif
}
}

View File

@@ -488,6 +488,7 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(EXT_buffer_age);
_EGL_CHECK_EXTENSION(EXT_create_context_robustness);
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import);
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import_modifiers);
_EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage);
_EGL_CHECK_EXTENSION(KHR_cl_event2);