[Mesa-dev] [PATCH v2 5/13] tests/sw_sync: Add subtest test_alloc_merge_fence
robert.foss at collabora.com
robert.foss at collabora.com
Wed Aug 24 20:41:32 UTC 2016
From: Robert Foss <robert.foss at collabora.com>
This subtest verifies that merging two fences works in the simples possible
case.
Signed-off-by: Robert Foss <robert.foss at collabora.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
---
tests/sw_sync.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/tests/sw_sync.c b/tests/sw_sync.c
index 102647d..851430e 100644
--- a/tests/sw_sync.c
+++ b/tests/sw_sync.c
@@ -60,6 +60,26 @@ static void test_alloc_fence_invalid_timeline(void)
sw_sync_fence_create(-1, 0);
}
+static void test_alloc_merge_fence(void)
+{
+ int in_fence[2];
+ int fence_merge;
+ int timeline[2];
+
+ timeline[0] = sw_sync_timeline_create();
+ timeline[1] = sw_sync_timeline_create();
+
+ in_fence[0] = sw_sync_fence_create(timeline[0], 1);
+ in_fence[1] = sw_sync_fence_create(timeline[1], 1);
+ fence_merge = sw_sync_merge(in_fence[1], in_fence[0]);
+
+ sw_sync_fence_destroy(in_fence[0]);
+ sw_sync_fence_destroy(in_fence[1]);
+ sw_sync_fence_destroy(fence_merge);
+ sw_sync_timeline_destroy(timeline[0]);
+ sw_sync_timeline_destroy(timeline[1]);
+}
+
igt_main
{
igt_subtest("alloc_timeline")
@@ -70,5 +90,8 @@ igt_main
igt_subtest("alloc_fence_invalid_timeline")
test_alloc_fence_invalid_timeline();
+
+ igt_subtest("alloc_merge_fence")
+ test_alloc_merge_fence();
}
--
git-series 0.8.10
More information about the mesa-dev
mailing list