summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <[email protected]>2017-07-07 02:54:26 -0400
committerDaniel Stone <[email protected]>2018-03-09 17:47:14 +0000
commit069fdd5f9facbd72fb6a289696c7b74e3237e70f (patch)
tree1a019e8325ed0d9799d710e6131b38a0cc28721d /src/egl/drivers/dri2/egl_dri2.c
parent61309c2a727d52d543207d6ae79fcb3e68b5cff3 (diff)
egl/x11: Support DRI3 v1.1
Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index c06a0ca0995..1bd57c9ea31 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -881,6 +881,13 @@ dri2_setup_extensions(_EGLDisplay *disp)
if (!dri2_bind_extensions(dri2_dpy, mandatory_core_extensions, extensions, false))
return EGL_FALSE;
+#ifdef HAVE_DRI3
+ dri2_dpy->multibuffers_available =
+ (dri2_dpy->dri3_major_version > 1 || (dri2_dpy->dri3_major_version == 1 &&
+ dri2_dpy->dri3_minor_version >= 2)) &&
+ (dri2_dpy->image && dri2_dpy->image->base.version >= 15);
+#endif
+
dri2_bind_extensions(dri2_dpy, optional_core_extensions, extensions, true);
return EGL_TRUE;
}