From 0c8456ef1e33fafa6074966e8f19dae4d19740ed Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 14 Jul 2015 10:54:16 -0700 Subject: [PATCH] vk/0.132: Add vkDestroyDynamicDepthStencilState() --- include/vulkan/vulkan.h | 5 +++++ src/vulkan/device.c | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 538b3f2e661..4527f2b51a7 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2065,6 +2065,7 @@ typedef VkResult (VKAPI *PFN_vkDestroyDynamicRasterState)(VkDevice device, VkDyn typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState); typedef VkResult (VKAPI *PFN_vkDestroyDynamicColorBlendState)(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState); typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState); +typedef VkResult (VKAPI *PFN_vkDestroyDynamicDepthStencilState)(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState); typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); @@ -2548,6 +2549,10 @@ VkResult VKAPI vkCreateDynamicDepthStencilState( const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState); +VkResult VKAPI vkDestroyDynamicDepthStencilState( + VkDevice device, + VkDynamicDepthStencilState dynamicDepthStencilState); + VkResult VKAPI vkCreateFramebuffer( VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index bbeb22a60b0..b35e0ea97b5 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1245,7 +1245,6 @@ VkResult anv_DestroyObject( return anv_DestroyDescriptorSetLayout(_device, (VkDescriptorSetLayout) _object); case VK_OBJECT_TYPE_DESCRIPTOR_SET: - case VK_OBJECT_TYPE_DYNAMIC_DS_STATE: case VK_OBJECT_TYPE_RENDER_PASS: /* These are trivially destroyable */ anv_device_free(device, (void *) _object); @@ -1260,6 +1259,9 @@ VkResult anv_DestroyObject( case VK_OBJECT_TYPE_DYNAMIC_CB_STATE: return anv_DestroyDynamicColorBlendState(_device, (VkDynamicColorBlendState) _object); + case VK_OBJECT_TYPE_DYNAMIC_DS_STATE: + return anv_DestroyDynamicDepthStencilState(_device, (VkDynamicDepthStencilState) _object); + case VK_OBJECT_TYPE_COMMAND_BUFFER: case VK_OBJECT_TYPE_FRAMEBUFFER: (object->destructor)(device, object, objType); @@ -2396,6 +2398,18 @@ VkResult anv_CreateDynamicDepthStencilState( return VK_SUCCESS; } +VkResult anv_DestroyDynamicDepthStencilState( + VkDevice _device, + VkDynamicDepthStencilState _ds_state) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_dynamic_ds_state, ds_state, _ds_state); + + anv_device_free(device, ds_state); + + return VK_SUCCESS; +} + // Command buffer functions static void -- 2.30.2