[Piglit] [PATCH 2/2] egl_khr_create_context: Explain why context creation must succeed

Chad Versace chad.versace at linux.intel.com
Mon Jan 28 17:04:35 PST 2013


In test egl_khr_create_context/default-minor-version-gl, context creation
is not required to succeed. When it fails, the test skips.

However, for tests default-{major,minor}-version-gles, context creation
*is*  required to succeed. This patch adds comments explaining why,

CC: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 tests/egl/spec/egl_khr_create_context/default-major-version-gles.c | 3 +++
 tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c b/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c
index cf61e01..e7da845 100644
--- a/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c
+++ b/tests/egl/spec/egl_khr_create_context/default-major-version-gles.c
@@ -45,6 +45,9 @@ int main(int argc, char **argv)
 	 * Request an OpenGL ES 1.x context by explicitly setting the minor
 	 * version to 0 and leaving the major version at the default value of
 	 * 1.
+	 *
+	 * The EGL_OPENGL_ES_BIT is set in EGLConfig's EGL_RENDERABLE_TYPE,
+	 * so the driver is required to succeed in creating an ES1 context.
 	 */
 	ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT, attribs);
 	if (ctx == EGL_NO_CONTEXT) {
diff --git a/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c b/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c
index 2331832..5fbb8d4 100644
--- a/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c
+++ b/tests/egl/spec/egl_khr_create_context/default-minor-version-gles.c
@@ -49,6 +49,10 @@ int main(int argc, char **argv)
 	 * Request an OpenGL ES 1.x or 2.0 context by explicitly setting the
 	 * major version and leaving the minor version at the default value of
 	 * 0.
+	 *
+	 * The EGLConfig's EGL_RENDERABLE_TYPE and the attribute list's
+	 * EGL_CONTEXT_MAJOR_VERSION_KHR have been chosen so that the driver
+	 * is required to succeed at context creation.
 	 */
 	ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT, attribs);
 	if (ctx == EGL_NO_CONTEXT) {
-- 
1.8.1.1



More information about the Piglit mailing list