diff options
author | Kristian Høgsberg <[email protected]> | 2010-02-09 19:59:33 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-02-09 21:24:14 -0500 |
commit | 368bb3dc2b640f862b857b2329499cad34a78846 (patch) | |
tree | d4ed3141896fdf3aae2aa313f62399cd72b4eb07 | |
parent | 360faf80ca763e195425ee7cadfee64002c8cd98 (diff) |
eglinfo: Also print visual type, assuming X visual types
This may not make a lot of sense for non-X EGL, but for EGL under X
it's very useful.
-rw-r--r-- | progs/egl/eglinfo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/progs/egl/eglinfo.c b/progs/egl/eglinfo.c index 9664667a68a..37bc22e9fd0 100644 --- a/progs/egl/eglinfo.c +++ b/progs/egl/eglinfo.c @@ -37,6 +37,10 @@ #define MAX_MODES 1000 #define MAX_SCREENS 10 +/* These are X visual types, so if you're running eglinfo under + * something not X, they probably don't make sense. */ +static const char *vnames[] = { "SG", "GS", "SC", "PC", "TC", "DC" }; + /** * Print table of all available configurations. */ @@ -49,15 +53,15 @@ PrintConfigs(EGLDisplay d) eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs); printf("Configurations:\n"); - printf(" bf lv colorbuffer dp st ms vis cav bi renderable supported\n"); - printf(" id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces \n"); + printf(" bf lv colorbuffer dp st ms vis cav bi renderable supported\n"); + printf(" id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces \n"); printf("---------------------------------------------------------------------\n"); for (i = 0; i < numConfigs; i++) { EGLint id, size, level; EGLint red, green, blue, alpha; EGLint depth, stencil; EGLint renderable, surfaces; - EGLint vid, caveat, bindRgb, bindRgba; + EGLint vid, vtype, caveat, bindRgb, bindRgba; EGLint samples, sampleBuffers; char surfString[100] = ""; @@ -72,6 +76,7 @@ PrintConfigs(EGLDisplay d) eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth); eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil); eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_ID, &vid); + eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_TYPE, &vtype); eglGetConfigAttrib(d, configs[i], EGL_CONFIG_CAVEAT, &caveat); eglGetConfigAttrib(d, configs[i], EGL_BIND_TO_TEXTURE_RGB, &bindRgb); @@ -95,11 +100,11 @@ PrintConfigs(EGLDisplay d) if (strlen(surfString) > 0) surfString[strlen(surfString) - 1] = 0; - printf("0x%02x %2d %2d %2d %2d %2d %2d %2d %2d %2d%2d 0x%03x ", + printf("0x%02x %2d %2d %2d %2d %2d %2d %2d %2d %2d%2d 0x%02x%s ", id, size, level, red, green, blue, alpha, depth, stencil, - samples, sampleBuffers, vid); + samples, sampleBuffers, vid, vtype < 6 ? vnames[vtype] : "--"); printf(" %c %c %c %c %c %c %s\n", (caveat != EGL_NONE) ? 'y' : ' ', (bindRgba) ? 'a' : (bindRgb) ? 'y' : ' ', |