MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / vk_DestroyInstance2

Function vk_DestroyInstance2

source/vulkan/vulkancommon.cpp:299–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void 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
322void vk_EnumerateInstanceExtensionProperties(CPU* cpu) {
323 initVulkan();

Callers

nothing calls this directly

Calls 4

getVulkanPtrFunction · 0.85
getInfoFromHandleFunction · 0.85
klogFunction · 0.85
freeVulkanPtrFunction · 0.85

Tested by

no test coverage detected