Hi, I’ve written a barebones wayland client, and I’m currently looking into how to use Vulkan alongside with Wayland. I’ve successfully connected to the display, and I have setup a working wl_surface, xdg_wm_base, … and the like. I would like to create a VkSurfaceKHR, but it seems like the VK_KHR_wayland_surface extension relies on libwayland.
// Taken from vulkan_wayland.h
typedef struct VkWaylandSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWaylandSurfaceCreateFlagsKHR flags;
struct wl_display* display;
struct wl_surface* surface;
} VkWaylandSurfaceCreateInfoKHR;
I currently have the following object IDs set up:
typedef struct
{
...
// Display file descriptor created with socket()
// and then connected to '$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY'
s32 DisplayFD;
u32 RegistryID; // wl_registry
u32 CompositorID; // wl_compositor
u32 XdgWmBaseID; // xdg_wm_base
u32 SurfaceID; // wl_surface
u32 XdgSurfaceID; // xdg_surface
u32 XdgTopLevelID; // xdg_toplevel
...
} wayland_state;
I would like to use these object IDs to create a VkSurfaceKHR, is that possible?