From 7552e026da51846c8d8755dbd95b830f82086080 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 10 Jul 2015 12:33:04 -0700 Subject: [PATCH] vk/device: Add an explicit destructor for RenderPass --- src/vulkan/device.c | 11 +++++++++++ src/vulkan/private.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 6efcfbdf470..25df95853ad 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -3723,6 +3723,17 @@ VkResult anv_CreateRenderPass( return VK_SUCCESS; } +VkResult anv_DestroyRenderPass( + VkDevice _device, + VkRenderPass renderPass) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + + anv_device_free(device, anv_render_pass_from_handle(renderPass)); + + return VK_SUCCESS; +} + VkResult anv_GetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, diff --git a/src/vulkan/private.h b/src/vulkan/private.h index c374311fc99..ea846bfc06e 100644 --- a/src/vulkan/private.h +++ b/src/vulkan/private.h @@ -949,6 +949,7 @@ VkResult anv_DestroyBufferView(VkDevice device, VkBufferView bufferView); VkResult anv_DestroyColorAttachmentView(VkDevice device, VkColorAttachmentView view); VkResult anv_DestroyDepthStencilView(VkDevice device, VkDepthStencilView view); +VkResult anv_DestroyRenderPass(VkDevice device, VkRenderPass renderPass); #define ANV_DEFINE_CASTS(__anv_type, __VkType) \ static inline struct __anv_type * \ -- 2.30.2