MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / AppCreateWaylandSurface

Function AppCreateWaylandSurface

vulkaninfo/vulkaninfo.h:1046–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1044}
1045
1046static VkSurfaceKHR AppCreateWaylandSurface(AppInstance &inst) {
1047 VkWaylandSurfaceCreateInfoKHR createInfo;
1048 createInfo.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
1049 createInfo.pNext = nullptr;
1050 createInfo.flags = 0;
1051 createInfo.display = inst.wayland_display;
1052 createInfo.surface = inst.wayland_surface;
1053
1054 VkSurfaceKHR surface;
1055 VkResult err = vkCreateWaylandSurfaceKHR(inst.instance, &createInfo, nullptr, &surface);
1056 if (err) THROW_VK_ERR("vkCreateWaylandSurfaceKHR", err);
1057 return surface;
1058}
1059
1060static void AppDestroyWaylandWindow(AppInstance &inst) { wl_display_disconnect(inst.wayland_display); }
1061#endif // VK_USE_PLATFORM_WAYLAND_KHR

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected