destroy render passes and framebuffers on exit
continuous-integration/drone/push Build is passing Details

pull/14/head
cosmonaut 2022-02-24 12:04:41 -08:00
parent 8d41e2a64a
commit 3fcc940586
1 changed files with 22 additions and 0 deletions

View File

@ -4376,6 +4376,28 @@ static void VULKAN_DestroyDevice(
NULL
);
for (i = 0; i < renderer->framebufferHashArray.count; i += 1)
{
renderer->vkDestroyFramebuffer(
renderer->logicalDevice,
renderer->framebufferHashArray.elements[i].value,
NULL
);
}
SDL_free(renderer->framebufferHashArray.elements);
for (i = 0; i < renderer->renderPassHashArray.count; i += 1)
{
renderer->vkDestroyRenderPass(
renderer->logicalDevice,
renderer->renderPassHashArray.elements[i].value,
NULL
);
}
SDL_free(renderer->renderPassHashArray.elements);
VULKAN_INTERNAL_DestroyUniformBufferPool(renderer, renderer->vertexUniformBufferPool);
VULKAN_INTERNAL_DestroyUniformBufferPool(renderer, renderer->fragmentUniformBufferPool);
VULKAN_INTERNAL_DestroyUniformBufferPool(renderer, renderer->computeUniformBufferPool);