diff options
author | Rafael Antognolli <rafael.antognolli@intel.com> | 2017-06-20 12:29:17 -0700 |
---|---|---|
committer | Rafael Antognolli <rafael.antognolli@intel.com> | 2017-06-27 11:15:55 -0700 |
commit | 93013f82a6478cdaa08bff9a0db8e929e9e181d4 (patch) | |
tree | ece689429dcd6b84c8c83934639ee1025d753041 | |
parent | d7bc3f6a9326c7bac6d965b8a750889a730a4273 (diff) |
egl_khr_fence_sync: add tests for android fence.
Add a new "profile" for android native fences. It basically reuses some
of the tests that should be common to this and the original
EGL_KHR_fence_sync extension.
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c index c96cc1456..d5353f2a0 100644 --- a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c +++ b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c @@ -1341,6 +1341,58 @@ static const struct piglit_subtest fence_sync_subtests[] = { {0}, }; +static struct test_profile fence_android_native = { + .sync_type = EGL_SYNC_NATIVE_FENCE_ANDROID, + .sync_str = "EGL_SYNC_NATIVE_FENCE_ANDROID", + .extension = "EGL_ANDROID_native_fence_sync", +}; + +static const struct piglit_subtest fence_android_native_subtests[] = { + { + "eglCreateSyncKHR_default_attributes", + "eglCreateSyncKHR_default_attributes", + test_eglCreateSyncKHR_default_attributes, + &fence_android_native, + }, + { + "eglCreateSyncKHR_invalid_display", + "eglCreateSyncKHR_invalid_display", + test_eglCreateSyncKHR_invalid_display, + &fence_android_native, + }, + { + "eglCreateSyncKHR_invalid_attrib_list", + "eglCreateSyncKHR_invalid_attrib_list", + test_eglCreateSyncKHR_invalid_attrib_list, + &fence_android_native, + }, + { + "eglCreateSyncKHR_wrong_display_same_thread", + "eglCreateSyncKHR_wrong_display_same_thread", + test_eglCreateSyncKHR_wrong_display_same_thread, + &fence_android_native, + }, + { + "eglCreateSyncKHR_no_current_context", + "eglCreateSyncKHR_no_current_context", + test_eglCreateSyncKHR_no_current_context, + &fence_android_native, + }, + { + "eglGetSyncAttribKHR_invalid_attrib", + "eglGetSyncAttribKHR_invalid_attrib", + test_eglGetSyncAttribKHR_invalid_attrib, + &fence_android_native, + }, + { + "eglClientWaitSyncKHR_nonzero_timeout", + "eglClientWaitSyncKHR_nonzero_timeout", + test_eglClientWaitSyncKHR_nonzero_timeout, + &fence_android_native, + }, + {0}, +}; + /** * Verify that eglWaitSyncKHR() emits correct error when given an invalid * sync object. @@ -1406,6 +1458,8 @@ main(int argc, char **argv) if (piglit_strip_arg(&argc, argv, "wait_sync")) subtests = wait_sync_subtests; + else if (piglit_strip_arg(&argc, argv, "android_native")) + subtests = fence_android_native_subtests; else subtests = fence_sync_subtests; |