diff options
author | Adam Jackson <ajax@redhat.com> | 2019-09-04 15:55:09 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2019-09-04 15:55:09 -0400 |
commit | 566906899afbf9156f8b1f5dd04fb165870abb40 (patch) | |
tree | 700ce677131cd0f56105992174ad4f9e0e50a8f0 | |
parent | ecccd4f136d5c76b461f23ae27943a5b148f9291 (diff) |
eglinfo: Add support for EGL_MESA_query_driver
Since we don't actually create a context it can be difficult to know
which driver's capabilities you think you're looking at.
-rw-r--r-- | src/egl/opengl/eglinfo.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c index c24f7682..13785738 100644 --- a/src/egl/opengl/eglinfo.c +++ b/src/egl/opengl/eglinfo.c @@ -140,13 +140,22 @@ PrintExtensions(EGLDisplay d) const char *extensions, *p, *end, *next; int column; - puts(d == EGL_NO_DISPLAY ? "EGL client extensions string:" : - "EGL extensions string:"); - extensions = eglQueryString(d, EGL_EXTENSIONS); if (!extensions) return NULL; +#ifdef EGL_MESA_query_driver + if (strstr(extensions, "EGL_MESA_query_driver")) { + PFNEGLGETDISPLAYDRIVERNAMEPROC getDisplayDriverName = + (PFNEGLGETDISPLAYDRIVERNAMEPROC) + eglGetProcAddress("eglGetDisplayDriverName"); + printf("EGL driver name: %s\n", getDisplayDriverName(d)); + } +#endif + + puts(d == EGL_NO_DISPLAY ? "EGL client extensions string:" : + "EGL extensions string:"); + column = 0; end = extensions + strlen(extensions); |