Skip to content

Conversation

@Lokomojo
Copy link

@Lokomojo Lokomojo commented Nov 26, 2025

Re: #358

Turns out that only a minimal change is needed to get Wayland support working in diligent - at least for vulkan only.

This patch will only try to create a wayland window if NativeWindow::pWaylandSurface is defined, otherwise will fall back to xcb/xlib

@TheMostDiligent
Copy link
Contributor

I am not fully following the logic - are you trying to create surface for everything?
The expectation is that the user will try to initialize the swap chain for one specific surface, not all of them, so it looks like all is needed here is to add the Wayland surface and then properly use it.

@Lokomojo
Copy link
Author

Lokomojo commented Nov 27, 2025

Right yes we can get rid of the foundPlatform flag. I was thinking automatic fallback but it makes no sense since each windowing system has its own property in LinuxNativeWindow.

}
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
if (m_Window.pDisplay != nullptr)
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR) || defined(VK_USE_PLATFORM_XCB_KHR) || defined(VK_USE_PLATFORM_XLIB_KHR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty branch that remained from your first version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants