Skip to content
Snippets Groups Projects
Commit f31f1edd authored by Christoph Haag's avatar Christoph Haag
Browse files

ipc: Set destroyed swapchains to not active

Fixes the service failing to create swapchains with "ERROR: Too many swapchains!"
after one or several sequentially started and quit clients created 32 swapchains.
parent 0dbbe423
No related branches found
No related tags found
No related merge requests found
......@@ -160,6 +160,8 @@ ipc_handle_swapchain_create(volatile struct ipc_client_state *cs,
uint32_t num_images = xsc->num_images;
IPC_SPEW(cs->server, "IPC: Created swapchain %d\n", index);
cs->xscs[index] = xsc;
cs->swapchain_data[index].active = true;
cs->swapchain_data[index].width = width;
......@@ -448,6 +450,8 @@ client_loop(volatile struct ipc_client_state *cs)
// Destroy all swapchains now.
for (uint32_t j = 0; j < IPC_MAX_CLIENT_SWAPCHAINS; j++) {
xrt_swapchain_destroy((struct xrt_swapchain **)&cs->xscs[j]);
cs->swapchain_data[j].active = false;
IPC_SPEW(cs->server, "IPC: Destroyed swapchain %d\n", j);
}
// Should we stop the server when a client disconnects?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment