From 66cbb7f76d55a1ad7e8d2d0315ce58da99c4f8ed Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 14 Jul 2015 11:21:01 -0700 Subject: [PATCH] vk/0.132: Add vkDestroyRenderPass() --- include/vulkan/vulkan.h | 5 +++++ src/vulkan/device.c | 5 +++-- src/vulkan/private.h | 2 -- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 23c87de9dd9..20672e325a3 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2073,6 +2073,7 @@ typedef VkResult (VKAPI *PFN_vkDestroyDynamicDepthStencilState)(VkDevice device, typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); typedef VkResult (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer); typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); +typedef VkResult (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass); typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer); typedef VkResult (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer); @@ -2589,6 +2590,10 @@ VkResult VKAPI vkCreateRenderPass( const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); +VkResult VKAPI vkDestroyRenderPass( + VkDevice device, + VkRenderPass renderPass); + VkResult VKAPI vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 7d764f33643..b7cbac97b78 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -3951,11 +3951,12 @@ VkResult anv_CreateRenderPass( VkResult anv_DestroyRenderPass( VkDevice _device, - VkRenderPass renderPass) + VkRenderPass _pass) { ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_render_pass, pass, _pass); - anv_device_free(device, anv_render_pass_from_handle(renderPass)); + anv_device_free(device, pass); return VK_SUCCESS; } diff --git a/src/vulkan/private.h b/src/vulkan/private.h index d5a2da2e35d..a8ff24214fd 100644 --- a/src/vulkan/private.h +++ b/src/vulkan/private.h @@ -944,8 +944,6 @@ anv_cmd_buffer_clear(struct anv_cmd_buffer *cmd_buffer, void * anv_lookup_entrypoint(const char *name); -VkResult anv_DestroyRenderPass(VkDevice device, VkRenderPass renderPass); - #define ANV_DEFINE_CASTS(__anv_type, __VkType) \ static inline struct __anv_type * \ __anv_type ## _from_handle(__VkType _handle) \ -- 2.30.2