vk/device: Add an explicit destructor for RenderPass
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 10 Jul 2015 19:33:04 +0000 (12:33 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 10 Jul 2015 19:33:04 +0000 (12:33 -0700)
src/vulkan/device.c
src/vulkan/private.h

index 6efcfbdf4700945b4c8d57e474fa46ef7f1d5901..25df95853adfcd37aed4f40febdc3dab1922b6d5 100644 (file)
@@ -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,
index c374311fc998055ed8e8221b45d1683c70c75935..ea846bfc06e7bc38eef35070ea683adec4e0ed95 100644 (file)
@@ -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 *                  \