Mesa (9.0): egl: Return EGL_BAD_MATCH for invalid profile attributes
Ian Romanick
idr at kemper.freedesktop.org
Fri Nov 2 19:23:36 UTC 2012
Module: Mesa
Branch: 9.0
Commit: cf7634d9665b26a321a9d8542d50c76693141b52
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf7634d9665b26a321a9d8542d50c76693141b52
Author: Matt Turner <mattst88 at gmail.com>
Date: Mon Oct 8 17:01:34 2012 -0700
egl: Return EGL_BAD_MATCH for invalid profile attributes
Version 12 of the EGL_KHR_create_context spec changed this behavior.
NOTE: This is a candidate for the 9.0 branch
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
(cherry picked from commit 587d5db11d8047663201c5fb06a6b2feb5d55891)
---
src/egl/main/eglcontext.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 71eca6f..4efb76b 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -229,17 +229,14 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
*
* "* If an OpenGL context is requested, the requested version
* is greater than 3.2, and the value for attribute
- * EGL_CONTEXT_PROFILE_MASK_KHR has no bits set; has any
- * bits set other than EGL_CONTEXT_CORE_PROFILE_BIT_KHR and
- * EGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_KHR; has more than
- * one of these bits set; or if the implementation does not
- * support the requested profile, then an
- * EGL_BAD_PROFILE_KHR error is generated."
- *
- * However, it does not define EGL_BAD_PROFILE_KHR. For now use
- * EGL_BAD_ATTRIBUTE.
+ * EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR has no bits set; has
+ * any bits set other than EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR
+ * and EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR; has
+ * more than one of these bits set; or if the implementation does
+ * not support the requested profile, then an EGL_BAD_MATCH error
+ * is generated."
*/
- err = EGL_BAD_ATTRIBUTE;
+ err = EGL_BAD_MATCH;
break;
}
}
More information about the mesa-commit
mailing list