Skip to content

Draft: vulkan/wsi/wayland: Avoid creating display in `get_present_modes`

Ian Douglas Scott requested to merge ids1024/mesa:display-init into main

Call wsi_wl_display_init to create a temporary display only if there is not a display in the wsi_wl_surface.

This fixes an issue where I see a wl_display_get_registry every time vkgears-wayland is resized. Resizing also seems to be smoother.

I think this should be correct. But is there a better way to do this? Calling wsi_wl_surface_display here doesn't work since it will try to access the ->chain.

There are also a few other functions that call wsi_wl_display_init. Ideally in a typical single-window application, it should only be called once.

Somewhat related: #11000, !29140.

Merge request reports

Loading