Skip to content

wsi/wl: flush connection on swapchain failure

wayland-client stores up to MAX_FDS_OUT (28) outgoing fds and then release them in batch later through close_fds.

While this is not a problem in normal situation, because the app would also have a reference to the same buffers, this is an issue when these buffers are released (eg: because the swapchain creation failed). In this situation wayland-client owns the last ref to these buffers and prevent their deletion.

This is an issue with dEQP-VK.wsi.wayland.swapchain.simulate_oom.image_extent because it creates swapchains in a fast loop with a failing allocator to fail the swapchain creation. Without this change, on a 16GB dGPU the test peaks at 95% VRAM / 60% GTT and completes in 1.5 sec. With this change, the max usage is 65% VRAM / 10% GTT and completes it in 0.3 sec.

Merge request reports