vk/0.132: Add vkDestroyDynamicRasterState()
authorChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 17:51:08 +0000 (10:51 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 17:51:08 +0000 (10:51 -0700)
include/vulkan/vulkan.h
src/vulkan/device.c

index 949b7df8c5f89a6f1bfc55cef944f5607700ef41..9e352da8e4aacf6739d19ff89f0dc628bfb1e186 100644 (file)
@@ -2061,6 +2061,7 @@ typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t w
 typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState);
 typedef VkResult (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkDynamicViewportState dynamicViewportState);
 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_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState);
 typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer);
@@ -2528,6 +2529,10 @@ VkResult VKAPI vkCreateDynamicRasterState(
     const VkDynamicRasterStateCreateInfo*       pCreateInfo,
     VkDynamicRasterState*                       pState);
 
+VkResult VKAPI vkDestroyDynamicRasterState(
+    VkDevice                                    device,
+    VkDynamicRasterState                        dynamicRasterState);
+
 VkResult VKAPI vkCreateDynamicColorBlendState(
     VkDevice                                    device,
     const VkDynamicColorBlendStateCreateInfo*   pCreateInfo,
index 0b2914e7d8e388096cac5b7e2dbe79bc86e5dd6e..53e998c226d9f7358ba4a102554d809862e5281e 100644 (file)
@@ -1245,7 +1245,6 @@ VkResult anv_DestroyObject(
       return anv_DestroyDescriptorSetLayout(_device, (VkDescriptorSetLayout) _object);
 
    case VK_OBJECT_TYPE_DESCRIPTOR_SET:
-   case VK_OBJECT_TYPE_DYNAMIC_RS_STATE:
    case VK_OBJECT_TYPE_DYNAMIC_CB_STATE:
    case VK_OBJECT_TYPE_DYNAMIC_DS_STATE:
    case VK_OBJECT_TYPE_RENDER_PASS:
@@ -1256,6 +1255,9 @@ VkResult anv_DestroyObject(
    case VK_OBJECT_TYPE_DYNAMIC_VP_STATE:
       return anv_DestroyDynamicViewportState(_device, (VkDynamicViewportState) _object);
 
+   case VK_OBJECT_TYPE_DYNAMIC_RS_STATE:
+      return anv_DestroyDynamicRasterState(_device, (VkDynamicRasterState) _object);
+
    case VK_OBJECT_TYPE_COMMAND_BUFFER:
    case VK_OBJECT_TYPE_FRAMEBUFFER:
       (object->destructor)(device, object, objType);
@@ -2296,6 +2298,18 @@ VkResult anv_CreateDynamicRasterState(
    return VK_SUCCESS;
 }
 
+VkResult anv_DestroyDynamicRasterState(
+    VkDevice                                    _device,
+    VkDynamicRasterState                        _rs_state)
+{
+   ANV_FROM_HANDLE(anv_device, device, _device);
+   ANV_FROM_HANDLE(anv_dynamic_rs_state, rs_state, _rs_state);
+
+   anv_device_free(device, rs_state);
+
+   return VK_SUCCESS;
+}
+
 VkResult anv_CreateDynamicColorBlendState(
     VkDevice                                    _device,
     const VkDynamicColorBlendStateCreateInfo*   pCreateInfo,