summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorVarad Gautam <[email protected]>2017-05-30 17:23:39 +0530
committerEric Engestrom <[email protected]>2017-05-30 13:56:20 +0100
commitde3c459bbd617275a9ed57be42f7c594bae04116 (patch)
tree8428357cad628f626080ddc829148e9c15ed6df5 /src/egl/main/eglapi.c
parent6719e058d6b8a38cc66accf1609fcabb66571e86 (diff)
egl: implement eglQueryDmaBufModifiersEXT
query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: move format check to the driver instead of making format queries here and then checking. v3: Check DRIimageExtension version before query (Daniel Stone) v4: - move to DRIimageExtension version 15, check queryDmaBufModifiers before calling (Jason Ekstrand) - pass external_only to the driver instead of setting as EGL_TRUE here (Emil Velikov, Daniel Stone) Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index d613920b012..a4d5f896e6d 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -2404,6 +2404,26 @@ eglQueryDmaBufFormatsEXT(EGLDisplay dpy, EGLint max_formats,
RETURN_EGL_EVAL(disp, ret);
}
+static EGLBoolean EGLAPIENTRY
+eglQueryDmaBufModifiersEXT(EGLDisplay dpy, EGLint format, EGLint max_modifiers,
+ EGLuint64KHR *modifiers, EGLBoolean *external_only,
+ EGLint *num_modifiers)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLDriver *drv;
+ EGLBoolean ret;
+
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
+
+ _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
+
+ ret = drv->API.QueryDmaBufModifiersEXT(drv, disp, format, max_modifiers,
+ modifiers, external_only,
+ num_modifiers);
+
+ RETURN_EGL_EVAL(disp, ret);
+}
+
__eglMustCastToProperFunctionPointerType EGLAPIENTRY
eglGetProcAddress(const char *procname)
{