From: Chad Versace Date: Tue, 14 Jul 2015 17:52:45 +0000 (-0700) Subject: vk/0.132: Add vkDestroyDynamicColorBlendState() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b29c929e8e2a7266833e4e1000613a770d5e67ae;p=mesa.git vk/0.132: Add vkDestroyDynamicColorBlendState() --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 9e352da8e4a..538b3f2e661 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2063,6 +2063,7 @@ typedef VkResult (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkD typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState); typedef VkResult (VKAPI *PFN_vkDestroyDynamicRasterState)(VkDevice device, VkDynamicRasterState dynamicRasterState); 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_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); @@ -2538,6 +2539,10 @@ VkResult VKAPI vkCreateDynamicColorBlendState( const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState); +VkResult VKAPI vkDestroyDynamicColorBlendState( + VkDevice device, + VkDynamicColorBlendState dynamicColorBlendState); + VkResult VKAPI vkCreateDynamicDepthStencilState( VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 53e998c226d..bbeb22a60b0 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_CB_STATE: case VK_OBJECT_TYPE_DYNAMIC_DS_STATE: case VK_OBJECT_TYPE_RENDER_PASS: /* These are trivially destroyable */ @@ -1258,6 +1257,9 @@ VkResult anv_DestroyObject( case VK_OBJECT_TYPE_DYNAMIC_RS_STATE: return anv_DestroyDynamicRasterState(_device, (VkDynamicRasterState) _object); + case VK_OBJECT_TYPE_DYNAMIC_CB_STATE: + return anv_DestroyDynamicColorBlendState(_device, (VkDynamicColorBlendState) _object); + case VK_OBJECT_TYPE_COMMAND_BUFFER: case VK_OBJECT_TYPE_FRAMEBUFFER: (object->destructor)(device, object, objType); @@ -2339,6 +2341,18 @@ VkResult anv_CreateDynamicColorBlendState( return VK_SUCCESS; } +VkResult anv_DestroyDynamicColorBlendState( + VkDevice _device, + VkDynamicColorBlendState _cb_state) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_dynamic_cb_state, cb_state, _cb_state); + + anv_device_free(device, cb_state); + + return VK_SUCCESS; +} + VkResult anv_CreateDynamicDepthStencilState( VkDevice _device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo,