tests: reset last fence before using it

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent aa34024038
commit 83faf22c16
  1. 3
      tests/test_virgl_cmd.c
  2. 5
      tests/testvirgl.c
  3. 1
      tests/testvirgl.h

@ -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);

@ -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;

@ -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);

Loading…
Cancel
Save