summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-31 01:57:37 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-31 11:20:15 +0800
commit89e6eb5fbe7fb036f5d1a5fef040cc9635a10672 (patch)
tree85e1410a5c917b90eb699a1ba4fa5fc4ffd420c5 /progs
parent66f0517695668ba9a30618015a94bfea4ba08a9b (diff)
progs/egl: Update eglinfo to display more attributes.
Add config caveat, bind-to-texture, and renderable type. Remove double buffer and stereo attributes.
Diffstat (limited to 'progs')
-rw-r--r--progs/egl/Makefile2
-rw-r--r--progs/egl/eglinfo.c30
2 files changed, 21 insertions, 11 deletions
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);
}
}