Mercurial > games > semicongine
changeset 1285:6d16003406fb
add: missing destroy-function for renderpass
author | sam <sam@basx.dev> |
---|---|
date | Mon, 29 Jul 2024 20:21:00 +0700 |
parents | feb52b1c18e0 |
children | ad9091fde244 |
files | semicongine/rendering/renderpasses.nim tests/test_rendering.nim |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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