[Mesa-dev,1/2] eglinfo: print client extensions

Submitted by Marek Olšák on Aug. 3, 2015, 5:33 p.m.

Details

Message ID 1438623236-2290-2-git-send-email-maraeo@gmail.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Marek Olšák Aug. 3, 2015, 5:33 p.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/egl/opengl/eglinfo.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c
index 961fd9c..8e82e73 100644
--- a/src/egl/opengl/eglinfo.c
+++ b/src/egl/opengl/eglinfo.c
@@ -162,9 +162,12 @@  PrintExtensions(EGLDisplay d)
    const char *extensions, *p, *end, *next;
    int column;
 
-   printf("EGL extensions string:\n");
+   puts(d == EGL_NO_DISPLAY ? "EGL client extensions string:" :
+                              "EGL extensions string:");
 
    extensions = eglQueryString(d, EGL_EXTENSIONS);
+   if (!extensions)
+      return;
 
    column = 0;
    end = extensions + strlen(extensions);
@@ -212,6 +215,7 @@  main(int argc, char *argv[])
 #endif
 
    PrintExtensions(d);
+   PrintExtensions(EGL_NO_DISPLAY);
 
    PrintConfigs(d);