diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2014-07-18 17:19:13 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-11-09 22:44:08 +0000 |
commit | 4bee0e1045fb32bac4486f417950bb6852d75739 (patch) | |
tree | 5ef30d0d4324b5cc9372fcd7e977c6c2f7a2d9a0 /tests | |
parent | 6d50aa6fe5d0825a62a60b2761d869e7a430bb11 (diff) |
test/gl_basic_test: introduce linux_gles* tests
The EGL, GLX (and WGL spec) are identical wrt ES compat contexts thus it
makes little sense to have the very same tests three times.
v2: Use TEST_RUN2, in order to print a more sensible testname at runtime.
v3: Use correct prefix for x11_egl tests. Spotted by Chad.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/gl_basic_test.c | 398 |
1 files changed, 119 insertions, 279 deletions
diff --git a/tests/functional/gl_basic_test.c b/tests/functional/gl_basic_test.c index 0bab36c..d42bca8 100644 --- a/tests/functional/gl_basic_test.c +++ b/tests/functional/gl_basic_test.c @@ -533,6 +533,86 @@ TEST(gl_basic, linux_gl43_compat) .version=43, .profile=WAFFLE_CONTEXT_COMPATIBILITY_PROFILE); } + +TEST(gl_basic, linux_gles1_rgb) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1); +} + +TEST(gl_basic, linux_gles1_rgba) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, + .alpha=true); +} + +TEST(gl_basic, linux_gles10) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, + .version=10, + .alpha=true); +} + +TEST(gl_basic, linux_gles11) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, + .version=11, + .alpha=true); +} + +TEST(gl_basic, linux_gles1_fwdcompat_bad_attribute) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, + .forward_compatible=true, + .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); +} + +TEST(gl_basic, linux_gles2_rgb) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2); +} + +TEST(gl_basic, linux_gles2_rgba) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, + .alpha=true); +} + +TEST(gl_basic, linux_gles20) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, + .version=20); +} + +TEST(gl_basic, linux_gles2_fwdcompat_bad_attribute) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, + .forward_compatible=true, + .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); +} + +TEST(gl_basic, linux_gles3_rgb) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3); +} + +TEST(gl_basic, linux_gles3_rgba) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, + .alpha=true); +} + +TEST(gl_basic, linux_gles30) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, + .version=30); +} + +TEST(gl_basic, linux_gles3_fwdcompat_bad_attribute) +{ + gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, + .forward_compatible=true, + .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); +} #endif #ifdef WAFFLE_HAS_CGL @@ -736,86 +816,6 @@ TEST(gl_basic, glx_gl_fwdcompat_bad_attribute) .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); } -TEST(gl_basic, glx_gles1_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1); -} - -TEST(gl_basic, glx_gles1_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .alpha=true); -} - -TEST(gl_basic, glx_gles10) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .version=10, - .alpha=true); -} - -TEST(gl_basic, glx_gles1_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - -TEST(gl_basic, glx_gles11) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .version=11, - .alpha=true); -} - -TEST(gl_basic, glx_gles2_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2); -} - -TEST(gl_basic, glx_gles2_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .alpha=true); -} - -TEST(gl_basic, glx_gles20) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .version=20); -} - -TEST(gl_basic, glx_gles2_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - -TEST(gl_basic, glx_gles3_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3); -} - -TEST(gl_basic, glx_gles3_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .alpha=true); -} - -TEST(gl_basic, glx_gles30) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .version=30); -} - -TEST(gl_basic, glx_gles3_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - static void testsuite_glx(void) { @@ -856,24 +856,24 @@ testsuite_glx(void) TEST_RUN2(gl_basic, glx_gl42_compat, linux_gl42_compat); TEST_RUN2(gl_basic, glx_gl43_compat, linux_gl43_compat); - TEST_RUN(gl_basic, glx_gles1_rgb); - TEST_RUN(gl_basic, glx_gles1_rgba); - TEST_RUN(gl_basic, glx_gles1_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, glx_gles1_rgb, linux_gles1_rgb); + TEST_RUN2(gl_basic, glx_gles1_rgba, linux_gles1_rgba); + TEST_RUN2(gl_basic, glx_gles1_fwdcompat_bad_attribute, linux_gles1_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, glx_gles10); - TEST_RUN(gl_basic, glx_gles11); + TEST_RUN2(gl_basic, glx_gles10, linux_gles10); + TEST_RUN2(gl_basic, glx_gles11, linux_gles10); - TEST_RUN(gl_basic, glx_gles2_rgb); - TEST_RUN(gl_basic, glx_gles2_rgba); - TEST_RUN(gl_basic, glx_gles2_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, glx_gles2_rgb, linux_gles2_rgb); + TEST_RUN2(gl_basic, glx_gles2_rgba, linux_gles2_rgba); + TEST_RUN2(gl_basic, glx_gles2_fwdcompat_bad_attribute, linux_gles2_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, glx_gles20); + TEST_RUN2(gl_basic, glx_gles20, linux_gles20); - TEST_RUN(gl_basic, glx_gles3_rgb); - TEST_RUN(gl_basic, glx_gles3_rgba); - TEST_RUN(gl_basic, glx_gles3_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, glx_gles3_rgb, linux_gles3_rgb); + TEST_RUN2(gl_basic, glx_gles3_rgba, linux_gles3_rgba); + TEST_RUN2(gl_basic, glx_gles3_fwdcompat_bad_attribute, linux_gles3_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, glx_gles30); + TEST_RUN2(gl_basic, glx_gles30, linux_gles30); } #endif // WAFFLE_HAS_GLX @@ -896,86 +896,6 @@ TEST(gl_basic, wayland_gl_fwdcompat_bad_attribute) .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); } -TEST(gl_basic, wayland_gles1_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1); -} - -TEST(gl_basic, wayland_gles1_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .alpha=true); -} - -TEST(gl_basic, wayland_gles10) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .version=10, - .alpha=true); -} - -TEST(gl_basic, wayland_gles1_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - -TEST(gl_basic, wayland_gles11) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .version=11, - .alpha=true); -} - -TEST(gl_basic, wayland_gles2_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2); -} - -TEST(gl_basic, wayland_gles2_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .alpha=true); -} - -TEST(gl_basic, wayland_gles20) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .version=20); -} - -TEST(gl_basic, wayland_gles2_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - -TEST(gl_basic, wayland_gles3_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3); -} - -TEST(gl_basic, wayland_gles3_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .alpha=true); -} - -TEST(gl_basic, wayland_gles30) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .version=30); -} - -TEST(gl_basic, wayland_gles3_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - static void testsuite_wayland(void) { @@ -1017,24 +937,24 @@ testsuite_wayland(void) TEST_RUN2(gl_basic, wayland_gl42_compat, linux_gl42_compat); TEST_RUN2(gl_basic, wayland_gl43_compat, linux_gl43_compat); - TEST_RUN(gl_basic, wayland_gles1_rgb); - TEST_RUN(gl_basic, wayland_gles1_rgba); - TEST_RUN(gl_basic, wayland_gles1_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, wayland_gles1_rgb, linux_gles1_rgb); + TEST_RUN2(gl_basic, wayland_gles1_rgba, linux_gles1_rgba); + TEST_RUN2(gl_basic, wayland_gles1_fwdcompat_bad_attribute, linux_gles1_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, wayland_gles10); - TEST_RUN(gl_basic, wayland_gles11); + TEST_RUN2(gl_basic, wayland_gles10, linux_gles10); + TEST_RUN2(gl_basic, wayland_gles11, linux_gles11); - TEST_RUN(gl_basic, wayland_gles2_rgb); - TEST_RUN(gl_basic, wayland_gles2_rgba); - TEST_RUN(gl_basic, wayland_gles2_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, wayland_gles1_rgb, linux_gles1_rgb); + TEST_RUN2(gl_basic, wayland_gles1_rgba, linux_gles1_rgba); + TEST_RUN2(gl_basic, wayland_gles1_fwdcompat_bad_attribute, linux_gles1_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, wayland_gles20); + TEST_RUN2(gl_basic, wayland_gles20, linux_gles20); - TEST_RUN(gl_basic, wayland_gles3_rgb); - TEST_RUN(gl_basic, wayland_gles3_rgba); - TEST_RUN(gl_basic, wayland_gles3_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, wayland_gles3_rgb, linux_gles3_rgb); + TEST_RUN2(gl_basic, wayland_gles3_rgba, linux_gles3_rgba); + TEST_RUN2(gl_basic, wayland_gles3_fwdcompat_bad_attribute, linux_gles3_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, wayland_gles30); + TEST_RUN2(gl_basic, wayland_gles30, linux_gles30); } #endif // WAFFLE_HAS_WAYLAND @@ -1057,86 +977,6 @@ TEST(gl_basic, x11_egl_gl_fwdcompat_bad_attribute) .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); } -TEST(gl_basic, x11_egl_gles1_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1); -} - -TEST(gl_basic, x11_egl_gles1_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .alpha=true); -} - -TEST(gl_basic, x11_egl_gles10) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .version=10, - .alpha=true); -} - -TEST(gl_basic, x11_egl_gles11) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .version=11, - .alpha=true); -} - -TEST(gl_basic, x11_egl_gles1_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES1, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - -TEST(gl_basic, x11_egl_gles2_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2); -} - -TEST(gl_basic, x11_egl_gles2_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .alpha=true); -} - -TEST(gl_basic, x11_egl_gles20) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .version=20); -} - -TEST(gl_basic, x11_egl_gles2_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES2, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - -TEST(gl_basic, x11_egl_gles3_rgb) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3); -} - -TEST(gl_basic, x11_egl_gles3_rgba) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .alpha=true); -} - -TEST(gl_basic, x11_egl_gles30) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .version=30); -} - -TEST(gl_basic, x11_egl_gles3_fwdcompat_bad_attribute) -{ - gl_basic_draw(.api=WAFFLE_CONTEXT_OPENGL_ES3, - .forward_compatible=true, - .expect_error=WAFFLE_ERROR_BAD_ATTRIBUTE); -} - static void testsuite_x11_egl(void) { @@ -1177,24 +1017,24 @@ testsuite_x11_egl(void) TEST_RUN2(gl_basic, x11_egl_gl42_compat, linux_gl42_compat); TEST_RUN2(gl_basic, x11_egl_gl43_compat, linux_gl43_compat); - TEST_RUN(gl_basic, x11_egl_gles1_rgb); - TEST_RUN(gl_basic, x11_egl_gles1_rgba); - TEST_RUN(gl_basic, x11_egl_gles1_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, x11_egl_gles1_rgb, linux_gles1_rgb); + TEST_RUN2(gl_basic, x11_egl_gles1_rgba, linux_gles1_rgba); + TEST_RUN2(gl_basic, x11_egl_gles1_fwdcompat_bad_attribute, linux_gles1_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, x11_egl_gles10); - TEST_RUN(gl_basic, x11_egl_gles11); + TEST_RUN2(gl_basic, x11_egl_gles10, linux_gles10); + TEST_RUN2(gl_basic, x11_egl_gles11, linux_gles11); - TEST_RUN(gl_basic, x11_egl_gles2_rgb); - TEST_RUN(gl_basic, x11_egl_gles2_rgba); - TEST_RUN(gl_basic, x11_egl_gles2_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, x11_egl_gles2_rgb, linux_gles2_rgb); + TEST_RUN2(gl_basic, x11_egl_gles2_rgba, linux_gles2_rgba); + TEST_RUN2(gl_basic, x11_egl_gles2_fwdcompat_bad_attribute, linux_gles2_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, x11_egl_gles20); + TEST_RUN2(gl_basic, x11_egl_gles20, linux_gles20); - TEST_RUN(gl_basic, x11_egl_gles3_rgb); - TEST_RUN(gl_basic, x11_egl_gles3_rgba); - TEST_RUN(gl_basic, x11_egl_gles3_fwdcompat_bad_attribute); + TEST_RUN2(gl_basic, x11_egl_gles3_rgb, linux_gles3_rgb); + TEST_RUN2(gl_basic, x11_egl_gles3_rgba, linux_gles3_rgba); + TEST_RUN2(gl_basic, x11_egl_gles3_fwdcompat_bad_attribute, linux_gles3_fwdcompat_bad_attribute); - TEST_RUN(gl_basic, x11_egl_gles30); + TEST_RUN2(gl_basic, x11_egl_gles30, linux_gles30); } #endif // WAFFLE_HAS_X11_EGL |