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

Function AppCreateXcbSurface

vulkaninfo/vulkaninfo.h:897–913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

895}
896
897static VkSurfaceKHR AppCreateXcbSurface(AppInstance &inst) {
898 if (!inst.xcb_connection) {
899 THROW_ERR("AppCreateXcbSurface failed to establish connection");
900 }
901
902 VkXcbSurfaceCreateInfoKHR xcb_createInfo;
903 xcb_createInfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;
904 xcb_createInfo.pNext = nullptr;
905 xcb_createInfo.flags = 0;
906 xcb_createInfo.connection = inst.xcb_connection;
907 xcb_createInfo.window = inst.xcb_window;
908
909 VkSurfaceKHR surface;
910 VkResult err = vkCreateXcbSurfaceKHR(inst.instance, &xcb_createInfo, nullptr, &surface);
911 if (err) THROW_VK_ERR("vkCreateXcbSurfaceKHR", err);
912 return surface;
913}
914
915static void AppDestroyXcbWindow(AppInstance &inst) {
916 if (!inst.xcb_connection) {

Callers

nothing calls this directly

Calls 1

vkCreateXcbSurfaceKHRFunction · 0.85

Tested by

no test coverage detected