diff --git a/vtest/vtest.h b/vtest/vtest.h index 43f030e..3e05819 100644 --- a/vtest/vtest.h +++ b/vtest/vtest.h @@ -42,7 +42,9 @@ struct vtest_input { int (*read)(struct vtest_input *input, void *buf, int size); }; -int vtest_init_renderer(int ctx_flags, const char *render_device); +int vtest_init_renderer(bool multi_clients, + int ctx_flags, + const char *render_device); void vtest_cleanup_renderer(void); int vtest_create_context(struct vtest_input *input, int out_fd, diff --git a/vtest/vtest_fuzzer.c b/vtest/vtest_fuzzer.c index 9fe0958..8a909b5 100644 --- a/vtest/vtest_fuzzer.c +++ b/vtest/vtest_fuzzer.c @@ -105,7 +105,7 @@ static void vtest_fuzzer_run_renderer(int out_fd, struct vtest_input *input, break; } - ret = vtest_init_renderer(ctx_flags, NULL); + ret = vtest_init_renderer(false, ctx_flags, NULL); if (ret >= 0) { ret = vtest_create_context(input, out_fd, header[0], &context); } diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c index 6e456e8..518b510 100644 --- a/vtest/vtest_renderer.c +++ b/vtest/vtest_renderer.c @@ -75,6 +75,7 @@ struct vtest_context { struct vtest_renderer { const char *rendernode_name; + bool multi_clients; uint32_t max_length; @@ -291,7 +292,9 @@ int vtest_buf_read(struct vtest_input *input, void *buf, int size) return size; } -int vtest_init_renderer(int ctx_flags, const char *render_device) +int vtest_init_renderer(bool multi_clients, + int ctx_flags, + const char *render_device) { int ret; @@ -307,6 +310,8 @@ int vtest_init_renderer(int ctx_flags, const char *render_device) return -1; } + renderer.multi_clients = multi_clients; + return 0; } diff --git a/vtest/vtest_server.c b/vtest/vtest_server.c index 835c359..5a2eec8 100644 --- a/vtest/vtest_server.c +++ b/vtest/vtest_server.c @@ -559,7 +559,9 @@ static void vtest_server_run(void) /* init renderer after the first active client is added */ is_empty = LIST_IS_EMPTY(&server.active_clients); if (was_empty && !is_empty) { - int ret = vtest_init_renderer(server.ctx_flags, server.render_device); + int ret = vtest_init_renderer(server.multi_clients, + server.ctx_flags, + server.render_device); if (ret) { vtest_server_inactivate_clients(); run = false;