I want to use vulkan renderering but due to me xdg-decoration-unstable-v1-client-protocol & xdg-decoration-unstable-v1 to tell the compositor for server side decorations i don't use the wl_shm but the validation layers complain about it LUNAVOXAL - TRACE: Validation layer: <TYPE:General> Copying old device 1 into new device 1wl_registry@2: error 0: invalid interface for global 3: have xdg_wm_base, wanted wl_shm i don't want to implement client side decorations gnome be damned right now could someone help me with this issue
#Vulkan used with wayland how to make a surface when I don't use wl_shm?
4 messages · Page 1 of 1 (latest)
Bit confused what you are asking. You don't use wl_shm at all when using vulkan with a wl_surface. Internally the driver would probabally use wl_drm but that's an implementation detail.,
I have a working example of wayland+vulkan here for example https://github.com/umbral-software/WaylandWSIExample
wl_registry *registry = wl_display_get_registry(display);
if (!registry)
{
Log::fatal("Failed to get registry");
}
wl_compositor *compositor =
static_cast<wl_compositor *>(wl_registry_bind(registry, 1, &wl_compositor_interface, 4));
if (!compositor)
{
Log::fatal("Failed to bind wl_compositor");
}
You are just assuming that wl_compositor is global #1 and the same for all the other globals? That's not how wayland works, you need to add a registry listener and wait for the server to tell you (normally by calling wl_display_roundtrip).
See here: https://github.com/umbral-software/WaylandWSIExample/blob/main/wayland/Display.cpp#L53