From 83faf22c16677db5afd897e3f6c99c5db0c8c62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 15 Dec 2015 17:56:29 +0100 Subject: [PATCH] tests: reset last fence before using it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Signed-off-by: Dave Airlie --- tests/test_virgl_cmd.c | 3 +++ tests/testvirgl.c | 5 +++++ tests/testvirgl.h | 1 + 3 files changed, 9 insertions(+) diff --git a/tests/test_virgl_cmd.c b/tests/test_virgl_cmd.c index c91d70a..28ca3b9 100644 --- a/tests/test_virgl_cmd.c +++ b/tests/test_virgl_cmd.c @@ -430,6 +430,7 @@ START_TEST(virgl_test_render_simple) virgl_renderer_submit_cmd(ctx.cbuf->buf, ctx.ctx_id, ctx.cbuf->cdw); /* create a fence */ + testvirgl_reset_fence(); ret = virgl_renderer_create_fence(1, ctx.ctx_id); ck_assert_int_eq(ret, 0); @@ -686,6 +687,7 @@ START_TEST(virgl_test_render_geom_simple) virgl_renderer_submit_cmd(ctx.cbuf->buf, ctx.ctx_id, ctx.cbuf->cdw); /* create a fence */ + testvirgl_reset_fence(); ret = virgl_renderer_create_fence(1, ctx.ctx_id); ck_assert_int_eq(ret, 0); @@ -930,6 +932,7 @@ START_TEST(virgl_test_render_xfb) virgl_renderer_submit_cmd(ctx.cbuf->buf, ctx.ctx_id, ctx.cbuf->cdw); /* create a fence */ + testvirgl_reset_fence(); ret = virgl_renderer_create_fence(1, ctx.ctx_id); ck_assert_int_eq(ret, 0); diff --git a/tests/testvirgl.c b/tests/testvirgl.c index 6e69479..03b31e0 100644 --- a/tests/testvirgl.c +++ b/tests/testvirgl.c @@ -104,6 +104,11 @@ uint32_t testvirgl_get_last_fence(void) return testvirgl_last_fence; } +void testvirgl_reset_fence(void) +{ + testvirgl_last_fence = 0; +} + int testvirgl_init_single_ctx(void) { int ret; diff --git a/tests/testvirgl.h b/tests/testvirgl.h index a2b0ffe..64f0a8e 100644 --- a/tests/testvirgl.h +++ b/tests/testvirgl.h @@ -65,6 +65,7 @@ void testvirgl_init_single_ctx_nr(void); void testvirgl_fini_single_ctx(void); uint32_t testvirgl_get_last_fence(void); +void testvirgl_reset_fence(void); int testvirgl_init_ctx_cmdbuf(struct virgl_context *ctx); void testvirgl_fini_ctx_cmdbuf(struct virgl_context *ctx);