mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Shutdown Vulkan properly
Well, as properly as can be considering how little is started up :P
This commit is contained in:
parent
ab08e4f207
commit
940ef833ae
2 changed files with 10 additions and 1 deletions
|
@ -46,6 +46,7 @@ INSTANCE_LEVEL_VULKAN_FUNCTION_EXTENSION (vkCreateDebugUtilsMessengerEXT)
|
||||||
#define DEVICE_LEVEL_VULKAN_FUNCTION(function)
|
#define DEVICE_LEVEL_VULKAN_FUNCTION(function)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DEVICE_LEVEL_VULKAN_FUNCTION (vkDestroyDevice)
|
||||||
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetDeviceQueue)
|
DEVICE_LEVEL_VULKAN_FUNCTION (vkGetDeviceQueue)
|
||||||
|
|
||||||
#undef DEVICE_LEVEL_VULKAN_FUNCTION
|
#undef DEVICE_LEVEL_VULKAN_FUNCTION
|
||||||
|
|
|
@ -214,7 +214,7 @@ Vulkan_Init_Common (void)
|
||||||
}
|
}
|
||||||
if (developer->int_val & SYS_VID) {
|
if (developer->int_val & SYS_VID) {
|
||||||
Sys_Printf ("%p %p\n", vulkan_device->device, vulkan_device->queue);
|
Sys_Printf ("%p %p\n", vulkan_device->device, vulkan_device->queue);
|
||||||
Vulkan_DestroyInstance (vulkan_instance);
|
Vulkan_Shutdown_Common ();
|
||||||
Sys_Quit();
|
Sys_Quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,5 +222,13 @@ Vulkan_Init_Common (void)
|
||||||
void
|
void
|
||||||
Vulkan_Shutdown_Common (void)
|
Vulkan_Shutdown_Common (void)
|
||||||
{
|
{
|
||||||
|
if (vulkan_device) {
|
||||||
|
vulkan_device->vkDestroyDevice (vulkan_device->device, 0);
|
||||||
|
free (vulkan_device);
|
||||||
|
vulkan_device = 0;
|
||||||
|
}
|
||||||
Vulkan_DestroyInstance (vulkan_instance);
|
Vulkan_DestroyInstance (vulkan_instance);
|
||||||
|
vulkan_instance = 0;
|
||||||
|
dlclose (vulkan_library);
|
||||||
|
vulkan_library = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue