summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-11-13 16:06:01 -0800
committerChad Versace <chad.versace@linux.intel.com>2012-11-20 12:33:47 -0800
commit0b2ee04dafba1479518b8b6a6433351733ea997d (patch)
tree6bb812709616d732278d1d4b15fafe335b19b436
parenta19009e25ba66679e0b7340e95e906cd2e726910 (diff)
egl-create-context-verify-gl-flavor: Test GLES3
- Request a config with the es3 bit, EGL_OPENGL_ES3_BIT_KHR. - Try to create a GLES 3.0 context with the config. - Verify that the context version is >= 3.0. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c b/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c
index ce658f4f..c88c4750 100644
--- a/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c
+++ b/tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c
@@ -73,6 +73,7 @@ enum gl_api {
API_GL_CORE,
API_GLES1,
API_GLES2,
+ API_GLES3,
};
static void (*my_glGetIntegerv)(GLenum pname, GLint *params);
@@ -170,6 +171,7 @@ check_flavor(int requested_version, enum gl_api requested_api)
break;
case API_GLES1:
case API_GLES2:
+ case API_GLES3:
requested_client_type = EGL_OPENGL_ES_API;
api_name = "OpenGL ES";
break;
@@ -414,6 +416,20 @@ check_opengl_es2(void)
return result;
}
+static enum piglit_result
+check_opengl_es3(void)
+{
+ enum piglit_result result = PIGLIT_SKIP;
+
+ if (!EGL_KHR_create_context_setup(EGL_OPENGL_ES3_BIT_KHR))
+ return PIGLIT_SKIP;
+
+ fold_results(&result, check_flavor(30, API_GLES3));
+
+ EGL_KHR_create_context_teardown();
+ return result;
+}
+
int
main(int argc, char **argv)
{
@@ -434,6 +450,7 @@ main(int argc, char **argv)
fold_results(&result, check_opengl());
fold_results(&result, check_opengl_es1());
fold_results(&result, check_opengl_es2());
+ fold_results(&result, check_opengl_es3());
piglit_report_result(result);
return EXIT_SUCCESS;