summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorVarad Gautam <[email protected]>2017-05-30 17:23:38 +0530
committerEric Engestrom <[email protected]>2017-05-30 13:56:20 +0100
commit6719e058d6b8a38cc66accf1609fcabb66571e86 (patch)
tree35a31b83f2a06f0687035f1699f0dfd1f42c956a /src/egl/main/eglapi.c
parent6f10e7c37a34570f61fa2db8fc1860553207b7e9 (diff)
egl: implement eglQueryDmaBufFormatsEXT
allow egl clients to query the dmabuf formats supported on this platform. v2: return EGLBoolean. v3: Check DRIimageExtension version before querying (Daniel Stone). v4: move to DRIimageExtension version 15, error checking (Jason Ekstrand). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> 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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 431678f8bd6..d613920b012 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -2386,6 +2386,24 @@ _eglFunctionCompare(const void *key, const void *elem)
return strcmp(procname, entrypoint->name);
}
+static EGLBoolean EGLAPIENTRY
+eglQueryDmaBufFormatsEXT(EGLDisplay dpy, EGLint max_formats,
+ EGLint *formats, EGLint *num_formats)
+{
+ _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.QueryDmaBufFormatsEXT(drv, disp, max_formats, formats,
+ num_formats);
+
+ RETURN_EGL_EVAL(disp, ret);
+}
+
__eglMustCastToProperFunctionPointerType EGLAPIENTRY
eglGetProcAddress(const char *procname)
{