diff options
author | Veluri Mithun <[email protected]> | 2019-01-23 22:44:25 +0530 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-01-24 14:37:47 +0000 |
commit | 6afce78128a4a73e1d57cbd61c240f54c6b09831 (patch) | |
tree | 374e3882297f0c5eefe89fcb47f81679649ba522 /src/egl/main/eglapi.c | |
parent | 7d9274388bacc5c30e0bb098f41bb5144475280a (diff) |
egl: Implement EGL API for MESA_query_driver
Signed-off-by: Veluri Mithun <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index bfd79a5952d..dd9b5b989cb 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -528,6 +528,7 @@ _eglCreateExtensionsString(_EGLDisplay *dpy) _eglAppendExtension(&exts, "EGL_MESA_configless_context"); _EGL_CHECK_EXTENSION(MESA_drm_image); _EGL_CHECK_EXTENSION(MESA_image_dma_buf_export); + _EGL_CHECK_EXTENSION(MESA_query_driver); _EGL_CHECK_EXTENSION(NOK_swap_region); _EGL_CHECK_EXTENSION(NOK_texture_from_pixmap); @@ -2649,6 +2650,38 @@ eglQueryDisplayAttribEXT(EGLDisplay dpy, RETURN_EGL_SUCCESS(disp, EGL_TRUE); } +static char * EGLAPIENTRY +eglGetDisplayDriverConfig(EGLDisplay dpy) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + char *ret; + + _EGL_FUNC_START(disp, EGL_NONE, NULL, NULL); + _EGL_CHECK_DISPLAY(disp, NULL, drv); + + assert(disp->Extensions.MESA_query_driver); + + ret = drv->API.QueryDriverConfig(disp); + RETURN_EGL_EVAL(disp, ret); +} + +static const char * EGLAPIENTRY +eglGetDisplayDriverName(EGLDisplay dpy) +{ + _EGLDisplay *disp = _eglLockDisplay(dpy); + _EGLDriver *drv; + const char *ret; + + _EGL_FUNC_START(disp, EGL_NONE, NULL, NULL); + _EGL_CHECK_DISPLAY(disp, NULL, drv); + + assert(disp->Extensions.MESA_query_driver); + + ret = drv->API.QueryDriverName(disp); + RETURN_EGL_EVAL(disp, ret); +} + __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname) { |