cosmic-comp
cosmic-comp copied to clipboard
Excessive time spent creating new Vulkan surfaces
When creating a new window wgpu::Surface::configure
spends an excessive amount of time in vkGetPhysicalDeviceSurfacePresentModesKHR
, vkGetPhysicalDeviceSurfaceFormatsKHR
, vkCreateSwapchainKHR
. As far as I can tell https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30014 doesn't help much here.
The time this takes is quite variable, and depends on overall lag in the compositor. Like creating a stack slows it down.
This is partly an issue in Mesa (and the design of VK_KHR_wayland_surface
, which doesn't share a "display" for multiple surfaces), but if we could improve the compositors response to get_registry
, binding the dmabuf global, etc. we could improve that. Though that may not really be possible while handlers are depend on global &mut State
(not sure if https://github.com/Smithay/smithay/pull/1384 could help with that).