Clean up the swapchain

And be a little safer about it
This commit is contained in:
Bill Currie 2019-07-13 01:14:21 +09:00
parent b4dc746a66
commit dd1c2db249

View file

@ -116,9 +116,15 @@ Vulkan_Init_Common (vulkan_ctx_t *ctx)
void
Vulkan_Shutdown_Common (vulkan_ctx_t *ctx)
{
Sys_Printf ("are we here?\n");
QFV_DestroyDevice (ctx->device);
QFV_DestroyInstance (ctx->instance);
if (ctx->swapchain) {
QFV_DestroySwapchain (ctx->swapchain);
}
if (ctx->device) {
QFV_DestroyDevice (ctx->device);
}
if (ctx->instance) {
QFV_DestroyInstance (ctx->instance);
}
ctx->instance = 0;
ctx->unload_vulkan (ctx);
}