diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2015-07-21 10:18:23 +0200 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2015-07-22 17:05:17 +0200 |
commit | 3cc2f1e83aa9a17c51e40da825fa102c2b4fe017 (patch) | |
tree | 0d0b461f5003fceb7666030f9f733daff0130c91 | |
parent | f9b879e0c73e03d135fd54215792710b55275336 (diff) |
egldevice: add simple eglQueryDeviceAttribEXT implementation
EGL_EXT_device_query itself doesn't define any valid values for
<attribute> so leave this function looking simple for values in the
future.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | src/egl/main/eglapi.c | 9 | ||||
-rw-r--r-- | src/egl/main/egldevice.c | 18 | ||||
-rw-r--r-- | src/egl/main/egldevice.h | 5 |
3 files changed, 31 insertions, 1 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 0f010d007a..1da4829478 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1831,7 +1831,14 @@ eglQueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribute, EGLAttrib *value) { - RETURN_EGL_SUCCESS(NULL, EGL_TRUE); + _EGLDevice *dev; + EGLBoolean ret; + + _EGL_CHECK_DEVICE(device, EGL_FALSE, dev); + + ret = _eglQueryDeviceAttribEXT(dev, attribute, value); + + RETURN_EGL_EVAL(NULL, ret); } static const char * EGLAPIENTRY diff --git a/src/egl/main/egldevice.c b/src/egl/main/egldevice.c index 6fc02f818d..10f1ddcb22 100644 --- a/src/egl/main/egldevice.c +++ b/src/egl/main/egldevice.c @@ -213,6 +213,24 @@ _eglFiniDeviceInfo(void) } /** + * Get attribute about specific device + */ +EGLBoolean +_eglQueryDeviceAttribEXT(_EGLDevice *device, + EGLint attribute, + EGLAttrib *value) +{ + if (!value) + return _eglError(EGL_BAD_PARAMETER, "eglQueryDeviceAttribEXT"); + + switch (attribute) { + default: + return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryDeviceAttribEXT"); + break; + } +} + +/** * Get string about a specific device. */ const char * diff --git a/src/egl/main/egldevice.h b/src/egl/main/egldevice.h index 51c6066672..14f0c1ff65 100644 --- a/src/egl/main/egldevice.h +++ b/src/egl/main/egldevice.h @@ -48,6 +48,11 @@ _EGLDevice * _eglLookupDevice(EGLDeviceEXT device); +EGLBoolean +_eglQueryDeviceAttribEXT(_EGLDevice *device, EGLint attribute, + EGLAttrib *value); + + const char * _eglQueryDeviceStringEXT(_EGLDevice *device, EGLint name); |