From 5eb33596a0db26586957365ab27fc6afdebfe057 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 20 Aug 2010 13:19:10 +0800 Subject: 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). --- src/egl/main/eglconfig.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/egl/main/eglconfig.c') 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; } } -- cgit v1.2.3