# HG changeset patch # User sam # Date 1722259260 -25200 # Node ID 6d16003406fb6e1bccee807090cd8ae45fd9da90 # Parent feb52b1c18e02f4de502aeec4f9bee36308e88d2 add: missing destroy-function for renderpass diff -r feb52b1c18e0 -r 6d16003406fb semicongine/rendering/renderpasses.nim --- a/semicongine/rendering/renderpasses.nim Mon Jul 29 20:09:04 2024 +0700 +++ b/semicongine/rendering/renderpasses.nim Mon Jul 29 20:21:00 2024 +0700 @@ -236,3 +236,6 @@ body vkCmdEndRenderPass(commandbuffer) + +proc destroyRenderPass*(renderPass: RenderPass) = + vkDestroyRenderPass(vulkan.device, renderpass.vk, nil) diff -r feb52b1c18e0 -r 6d16003406fb tests/test_rendering.nim --- a/tests/test_rendering.nim Mon Jul 29 20:09:04 2024 +0700 +++ b/tests/test_rendering.nim Mon Jul 29 20:21:00 2024 +0700 @@ -759,8 +759,8 @@ vkDestroyImageView(vulkan.device, msaaImageView, nil) vkDestroyImage(vulkan.device, msaaImage, nil) vkFreeMemory(vulkan.device, msaaMemory, nil) - vkDestroyRenderPass(vulkan.device, offscreenRP.vk, nil) - vkDestroyRenderPass(vulkan.device, presentRP.vk, nil) + destroyRenderPass(offscreenRP) + destroyRenderPass(presentRP) vkDestroyFramebuffer(vulkan.device, offscreenFB, nil) clearSwapchain() @@ -804,7 +804,7 @@ test_07_png_texture(time) checkVkResult vkDeviceWaitIdle(vulkan.device) - vkDestroyRenderPass(vulkan.device, renderpass.vk, nil) + destroyRenderPass(renderpass) clearSwapchain() # test multiple render passes