[Mesa-dev] [PATCH 01/10] egl: add initial boilerplate for EGL_EXT_device_base
Emil Velikov
emil.l.velikov at gmail.com
Fri Aug 3 12:44:17 UTC 2018
From: Jonny Lamb <jonny.lamb at collabora.co.uk>
The extension is effectively a combination of device_enumerate and
device_query.
This adds the stubbed entry points alongside the EGL_KHR_debug
boilerplate.
v2 (Emil) - rebase, EGL_KHR_debug boilerplate, remove ifdef guards
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/main/eglapi.c | 37 ++++++++++++++++++++++++++++++++++++
src/egl/main/eglentrypoint.h | 4 ++++
src/egl/main/eglglobals.c | 3 +++
3 files changed, 44 insertions(+)
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index deb479b6d56..65e075591f0 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -2563,6 +2563,43 @@ eglSetBlobCacheFuncsANDROID(EGLDisplay *dpy, EGLSetBlobFuncANDROID set,
_eglUnlockDisplay(disp);
}
+static EGLBoolean EGLAPIENTRY
+eglQueryDeviceAttribEXT(EGLDeviceEXT device,
+ EGLint attribute,
+ EGLAttrib *value)
+{
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
+ RETURN_EGL_SUCCESS(NULL, EGL_TRUE);
+}
+
+static const char * EGLAPIENTRY
+eglQueryDeviceStringEXT(EGLDeviceEXT device,
+ EGLint name)
+{
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, NULL);
+ RETURN_EGL_SUCCESS(NULL, "eglQueryDeviceStringEXT");
+}
+
+static EGLBoolean EGLAPIENTRY
+eglQueryDevicesEXT(EGLint max_devices,
+ EGLDeviceEXT *devices,
+ EGLint *num_devices)
+{
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
+ RETURN_EGL_SUCCESS(NULL, EGL_TRUE);
+}
+
+static EGLBoolean EGLAPIENTRY
+eglQueryDisplayAttribEXT(EGLDisplay dpy,
+ EGLint attribute,
+ EGLAttrib *value)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
+ RETURN_EGL_SUCCESS(disp, EGL_TRUE);
+}
+
__eglMustCastToProperFunctionPointerType EGLAPIENTRY
eglGetProcAddress(const char *procname)
{
diff --git a/src/egl/main/eglentrypoint.h b/src/egl/main/eglentrypoint.h
index 06749f6353a..69a6c1bf4c7 100644
--- a/src/egl/main/eglentrypoint.h
+++ b/src/egl/main/eglentrypoint.h
@@ -56,6 +56,10 @@ EGL_ENTRYPOINT(eglPostSubBufferNV)
EGL_ENTRYPOINT(eglQueryAPI)
EGL_ENTRYPOINT(eglQueryContext)
EGL_ENTRYPOINT(eglQueryDebugKHR)
+EGL_ENTRYPOINT(eglQueryDeviceAttribEXT)
+EGL_ENTRYPOINT(eglQueryDeviceStringEXT)
+EGL_ENTRYPOINT(eglQueryDevicesEXT)
+EGL_ENTRYPOINT(eglQueryDisplayAttribEXT)
EGL_ENTRYPOINT(eglQueryDmaBufFormatsEXT)
EGL_ENTRYPOINT(eglQueryDmaBufModifiersEXT)
EGL_ENTRYPOINT(eglQueryString)
diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c
index c506bd6a9db..855cb335554 100644
--- a/src/egl/main/eglglobals.c
+++ b/src/egl/main/eglglobals.c
@@ -60,6 +60,9 @@ struct _egl_global _eglGlobal =
.ClientOnlyExtensionString =
"EGL_EXT_client_extensions"
+ " EGL_EXT_device_base"
+ " EGL_EXT_device_enumeration"
+ " EGL_EXT_device_query"
" EGL_EXT_platform_base"
" EGL_KHR_client_get_all_proc_addresses"
" EGL_KHR_debug",
--
2.18.0
More information about the mesa-dev
mailing list