[Piglit] [PATCH] egl: Test more invalid GLES1/GLES2 context versions (v2)
Chad Versace
chad.versace at linux.intel.com
Mon Nov 5 16:18:02 PST 2012
In test egl-create-context-invalid-gl-version, try to create OpenGL ES1
and OpenGL ES2 contexts with additional invalid versions: 3.2, 3.9, 4.7.
Also, quote the bit of the EGL_KHR_create_context spec that states
EGL_BAD_MATCH should be emitted in this case.
Fails with mesa-84b437 on Intel Sandybridge.
v2:
- Test the invalid versions against ES1 *and* ES2.
- Quote the spec.
CC: Matt Turner <mattst88 at gmail.com>
---
tests/egl/spec/egl_khr_create_context/invalid-gl-version.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c b/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c
index ee33fb9..6406210 100644
--- a/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c
+++ b/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c
@@ -49,6 +49,13 @@ static bool try_version(int major, int minor)
* EGL_CONTEXT_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL
* version and feature set that are not defined, than an
* EGL_BAD_MATCH error is generated."
+ *
+ * [...]
+ *
+ * If an OpenGL ES context is requested and the values for
+ * attributes EGL_CONTEXT_MAJOR_VERSION_KHR and
+ * EGL_CONTEXT_MINOR_VERSION_KHR specify an OpenGL ES version that
+ * is not defined, than an EGL_BAD_MATCH error is generated.
*/
piglit_expect_egl_error(EGL_BAD_MATCH, PIGLIT_FAIL);
@@ -82,6 +89,9 @@ int main(int argc, char **argv)
pass = pass && try_version(0, 0);
pass = pass && try_version(0, -1);
pass = pass && try_version(1, 2);
+ pass = pass && try_version(3, 2);
+ pass = pass && try_version(3, 9);
+ pass = pass && try_version(4, 7);
EGL_KHR_create_context_teardown();
}
@@ -89,6 +99,9 @@ int main(int argc, char **argv)
ran_test = true;
pass = pass && try_version(2, -1);
pass = pass && try_version(2, 1);
+ pass = pass && try_version(3, 2);
+ pass = pass && try_version(3, 9);
+ pass = pass && try_version(4, 7);
EGL_KHR_create_context_teardown();
}
--
1.7.11.7
More information about the Piglit
mailing list