| 297 | } |
| 298 | |
| 299 | void vk_DestroyInstance2(CPU* cpu) { |
| 300 | if (!ARG1) { |
| 301 | return; |
| 302 | } |
| 303 | VkInstance instance = (VkInstance)getVulkanPtr(cpu->memory, ARG1); |
| 304 | BoxedVulkanInfo* pBoxedInfo = getInfoFromHandle(cpu->memory, ARG1); |
| 305 | static bool shown; if (!shown && ARG2) { klog("vkDestroyInstance:VkAllocationCallbacks not implemented"); shown = true; } |
| 306 | VkAllocationCallbacks* pAllocator = NULL; |
| 307 | |
| 308 | #ifdef _DEBUG |
| 309 | PFN_vkDestroyDebugUtilsMessengerEXT debugFunc = (PFN_vkDestroyDebugUtilsMessengerEXT)pvkGetInstanceProcAddr(pBoxedInfo->instance, "vkDestroyDebugUtilsMessengerEXT"); |
| 310 | |
| 311 | if (debugFunc) { |
| 312 | debugFunc(pBoxedInfo->instance, pBoxedInfo->debugMessenger, nullptr); |
| 313 | } else { |
| 314 | klog("Vulkan debug function not found"); |
| 315 | } |
| 316 | #endif |
| 317 | |
| 318 | pBoxedInfo->pvkDestroyInstance(instance, pAllocator); |
| 319 | freeVulkanPtr(cpu->memory, ARG1); |
| 320 | } |
| 321 | |
| 322 | void vk_EnumerateInstanceExtensionProperties(CPU* cpu) { |
| 323 | initVulkan(); |
nothing calls this directly
no test coverage detected