[Piglit] [PATCH 2/3] egl_khr_create_context: Check eglChooseConfig's errors
Chad Versace
chad.versace at linux.intel.com
Mon Nov 19 08:53:12 PST 2012
If eglChooseConfig fails with EGL_BAD_ATTRIBUTE, then fail the test.
Piglit only requests valid attributes, therefore the error is incorrect.
Regresses test egl-create-context-verify-gl-flavor:gles3.0 on
mesa-5cf853669. Mesa fails to recoginize EGL_OPENGL_ES3_BIT_KHR despite
exposing the EGL_KHR_create_context extension.
CC: Matt Turner <mattst88 at gmail.com>
CC: Ian Romanick <idr at freedesktop.org>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
tests/egl/spec/egl_khr_create_context/common.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/egl/spec/egl_khr_create_context/common.c b/tests/egl/spec/egl_khr_create_context/common.c
index c3920b8..e94d100 100644
--- a/tests/egl/spec/egl_khr_create_context/common.c
+++ b/tests/egl/spec/egl_khr_create_context/common.c
@@ -119,6 +119,15 @@ EGL_KHR_create_context_setup(EGLint renderable_type_mask)
if (!eglChooseConfig(egl_dpy, config_attribs, &cfg, 1, &count) ||
count == 0) {
+ if (eglGetError() == EGL_BAD_ATTRIBUTE) {
+ /* Piglit requests only valid attributes, therefore
+ * EGL_BAD_ATTRIBUTE should not be emitted.
+ */
+ fprintf(stderr, "eglChooseConfig() emitted "
+ "EGL_BAD_ATTRIBUTE\n");
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
return false;
}
--
1.7.11.7
More information about the Piglit
mailing list