}
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;
}
}
}
}
- if (err == EGL_SUCCESS && ctx->Config) {
- EGLint renderable_type, api_bit;
-
- renderable_type = GET_CONFIG_ATTRIB(ctx->Config, EGL_RENDERABLE_TYPE);
- api_bit = _eglGetContextAPIBit(ctx);
- if (!(renderable_type & api_bit))
- err = EGL_BAD_CONFIG;
- }
-
return err;
}
ctx->ClientVersion = 1; /* the default, per EGL spec */
err = _eglParseContextAttribList(ctx, attrib_list);
+ if (err == EGL_SUCCESS && ctx->Config) {
+ EGLint renderable_type, api_bit;
+
+ renderable_type = GET_CONFIG_ATTRIB(ctx->Config, EGL_RENDERABLE_TYPE);
+ api_bit = _eglGetContextAPIBit(ctx);
+ if (!(renderable_type & api_bit)) {
+ _eglLog(_EGL_DEBUG, "context api is 0x%x while config supports 0x%x",
+ api_bit, renderable_type);
+ err = EGL_BAD_CONFIG;
+ }
+ }
if (err != EGL_SUCCESS)
return _eglError(err, "eglCreateContext");