| 1006 | } |
| 1007 | |
| 1008 | static VkSurfaceKHR AppCreateMetalSurface(AppInstance &inst) { |
| 1009 | VkMetalSurfaceCreateInfoEXT createInfo; |
| 1010 | createInfo.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT; |
| 1011 | createInfo.pNext = nullptr; |
| 1012 | createInfo.flags = 0; |
| 1013 | createInfo.pLayer = static_cast<CAMetalLayer *>(GetCAMetalLayerFromMetalView(inst.metal_window)); |
| 1014 | |
| 1015 | VkSurfaceKHR surface; |
| 1016 | VkResult err = vkCreateMetalSurfaceEXT(inst.instance, &createInfo, nullptr, &surface); |
| 1017 | if (err) THROW_VK_ERR("vkCreateMetalSurfaceEXT", err); |
| 1018 | return surface; |
| 1019 | } |
| 1020 | |
| 1021 | static void AppDestroyMetalWindow(AppInstance &inst) { DestroyMetalView(inst.metal_window); } |
| 1022 | #endif // VK_USE_PLATFORM_METAL_EXT |
nothing calls this directly
no outgoing calls
no test coverage detected