diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 3a168d2113b..26d9f922020 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -2222,6 +2222,12 @@ static void wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain, const VkAllocationCallbacks *pAllocator) { + /* Force wayland-client to release fd sent during the swapchain + * creation (see MAX_FDS_OUT) to avoid filling up VRAM with + * released buffers. + */ + wl_display_flush(chain->wsi_wl_surface->display->wl_display); + if (chain->frame) wl_callback_destroy(chain->frame); if (chain->tearing_control)