summaryrefslogtreecommitdiff
path: root/src/egl/main/eglconfig.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-08-20 13:19:10 +0800
committerChia-I Wu <olv@lunarg.com>2010-08-20 19:22:51 +0800
commit5eb33596a0db26586957365ab27fc6afdebfe057 (patch)
treeba1a37e4dcbed131d1a774d824b82d4522d0aec4 /src/egl/main/eglconfig.c
parentce2cae4130548872a0205097b0b5dbe0f4f57d5f (diff)
egl: Fix context API check and be verbose.
The API of the context was not checked against EGL_RENDERABLE_TYPE when there was no attribute list. Move the check to _eglInitContext, and be verbose about common mistakes (EGL_RENDERABLE_TYPE not set, EGL_CONTEXT_CLIENT_VERSION not set, or eglBindAPI not called).
Diffstat (limited to 'src/egl/main/eglconfig.c')
-rw-r--r--src/egl/main/eglconfig.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index ea8e47d02b..01e7144d40 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -460,11 +460,14 @@ _eglMatchConfig(const _EGLConfig *conf, const _EGLConfig *criteria)
}
if (!matched) {
-#ifdef DEBUG
+#ifndef DEBUG
+ /* only print the common errors when DEBUG is not defined */
+ if (attr != EGL_RENDERABLE_TYPE)
+ break;
+#endif
_eglLog(_EGL_DEBUG,
"the value (0x%x) of attribute 0x%04x did not meet the criteria (0x%x)",
val, attr, cmp);
-#endif
break;
}
}