On Thu, Nov 17, 2016 at 10:01:56AM -0500, robert.f...@collabora.com wrote:
> From: Robert Foss <robert.f...@collabora.com>
> 
> This subtest verifies merging a fence with itself does not fail.
> 
> Signed-off-by: Robert Foss <robert.f...@collabora.com>
> Reviewed-by: Eric Engestrom <e...@engestrom.ch>
> ---
>  tests/sw_sync.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/tests/sw_sync.c b/tests/sw_sync.c
> index 528be4d..51aa025 100644
> --- a/tests/sw_sync.c
> +++ b/tests/sw_sync.c
> @@ -179,6 +179,30 @@ static void test_sync_merge(void)
>       close(timeline);
>  }
>  
> +static void test_sync_merge_same(void)
> +{
> +     int in_fence[2];
> +     int timeline;
> +     int signaled;
> +
> +     timeline = sw_sync_timeline_create();
> +     in_fence[0] = sw_sync_fence_create(timeline, 1);
> +     in_fence[1] = sync_merge(in_fence[0], in_fence[0]);
> +
> +     signaled = sync_fence_count_status(in_fence[0],
> +                                           SW_SYNC_FENCE_STATUS_SIGNALED);
> +     igt_assert_f(signaled == 0, "fence signaled too early\n");
> +
> +     sw_sync_timeline_inc(timeline, 1);
> +     signaled = sync_fence_count_status(in_fence[0],
> +                                           SW_SYNC_FENCE_STATUS_SIGNALED);
> +     igt_assert_f(signaled == 1, "fence did not signal\n");

But what in_fence[1]? How does the lifetime of in_fence[1] relate to
in_fence[0]?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to