Commit 34db73da authored by Matt Turner's avatar Matt Turner

egl_khr_create_context: Brown bag fixes

Namely, don't print anything if the test passes, otherwise this is
interpreted as a warning, as would happen if GLES2 wasn't available;
and EGL_BAD_MATCH is generated if forward-compatible contexts aren't
supported, not EGL_BAD_ATTRIBUTE.
parent 6f7ac70b
......@@ -119,7 +119,6 @@ EGL_KHR_create_context_setup(EGLint renderable_type_mask)
if (!eglChooseConfig(egl_dpy, config_attribs, &cfg, 1, &count) ||
count == 0) {
fprintf(stderr, "eglChooseConfig() failed\n");
return false;
}
......
......@@ -49,15 +49,15 @@ static bool try_flag(int flag)
}
eglDestroyContext(egl_dpy, ctx);
} else {
fprintf(stderr, "Failed to create context with flag %d\n", flag);
/* The EGL_KHR_create_context spec says:
*
* "* If an attribute name or attribute value in <attrib_list> is not
* recognized (including unrecognized bits in bitmask attributes),
* then an EGL_BAD_ATTRIBUTE error is generated."
* "* If <config> does not support a client API context compatible
* with the requested API major and minor version, context flags,
* and context reset notification behavior (for client API types
* where these attributes are supported), then an EGL_BAD_MATCH
* error is generated.
*/
piglit_expect_egl_error(EGL_BAD_ATTRIBUTE, PIGLIT_FAIL);
piglit_expect_egl_error(EGL_BAD_MATCH, PIGLIT_FAIL);
}
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment