From 89e6eb5fbe7fb036f5d1a5fef040cc9635a10672 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 31 Jan 2010 01:57:37 +0800 Subject: progs/egl: Update eglinfo to display more attributes. Add config caveat, bind-to-texture, and renderable type. Remove double buffer and stereo attributes. --- progs/egl/Makefile | 2 +- progs/egl/eglinfo.c | 30 ++++++++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) (limited to 'progs') diff --git a/progs/egl/Makefile b/progs/egl/Makefile index 68bb5679f8..0ddb2cabb4 100644 --- a/progs/egl/Makefile +++ b/progs/egl/Makefile @@ -45,7 +45,7 @@ egltri: egltri.o $(HEADERS) $(LIB_DEP) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) eglinfo: eglinfo.o $(HEADERS) $(LIB_DEP) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) eglgears: eglgears.o $(HEADERS) $(LIB_DEP) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) diff --git a/progs/egl/eglinfo.c b/progs/egl/eglinfo.c index 4486916e95..9664667a68 100644 --- a/progs/egl/eglinfo.c +++ b/progs/egl/eglinfo.c @@ -49,16 +49,15 @@ PrintConfigs(EGLDisplay d) eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs); printf("Configurations:\n"); - printf(" bf lv d st colorbuffer dp st ms vis supported\n"); - printf(" id sz l b ro r g b a th cl ns b id surfaces \n"); - printf("--------------------------------------------------------\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 surfaces; - EGLint doubleBuf = 1, stereo = 0; - EGLint vid; + EGLint renderable, surfaces; + EGLint vid, caveat, bindRgb, bindRgba; EGLint samples, sampleBuffers; char surfString[100] = ""; @@ -73,6 +72,11 @@ 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_CONFIG_CAVEAT, &caveat); + eglGetConfigAttrib(d, configs[i], EGL_BIND_TO_TEXTURE_RGB, &bindRgb); + eglGetConfigAttrib(d, configs[i], EGL_BIND_TO_TEXTURE_RGBA, &bindRgba); + eglGetConfigAttrib(d, configs[i], EGL_RENDERABLE_TYPE, &renderable); eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces); eglGetConfigAttrib(d, configs[i], EGL_SAMPLES, &samples); @@ -91,13 +95,19 @@ PrintConfigs(EGLDisplay d) if (strlen(surfString) > 0) surfString[strlen(surfString) - 1] = 0; - printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %2d%2d 0x%02x %-12s\n", + printf("0x%02x %2d %2d %2d %2d %2d %2d %2d %2d %2d%2d 0x%03x ", id, size, level, - doubleBuf ? 'y' : '.', - stereo ? 'y' : '.', red, green, blue, alpha, depth, stencil, - samples, sampleBuffers, vid, surfString); + samples, sampleBuffers, vid); + printf(" %c %c %c %c %c %c %s\n", + (caveat != EGL_NONE) ? 'y' : ' ', + (bindRgba) ? 'a' : (bindRgb) ? 'y' : ' ', + (renderable & EGL_OPENGL_BIT) ? 'y' : ' ', + (renderable & EGL_OPENGL_ES_BIT) ? 'y' : ' ', + (renderable & EGL_OPENGL_ES2_BIT) ? 'y' : ' ', + (renderable & EGL_OPENVG_BIT) ? 'y' : ' ', + surfString); } } -- cgit v1.2.3