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_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer);
typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass);
typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity);
typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer);
const VkFramebufferCreateInfo* pCreateInfo,
VkFramebuffer* pFramebuffer);
+VkResult VKAPI vkDestroyFramebuffer(
+ VkDevice device,
+ VkFramebuffer framebuffer);
+
VkResult VKAPI vkCreateRenderPass(
VkDevice device,
const VkRenderPassCreateInfo* pCreateInfo,
case VK_OBJECT_TYPE_DYNAMIC_DS_STATE:
return anv_DestroyDynamicDepthStencilState(_device, (VkDynamicDepthStencilState) _object);
- case VK_OBJECT_TYPE_COMMAND_BUFFER:
case VK_OBJECT_TYPE_FRAMEBUFFER:
+ return anv_DestroyFramebuffer(_device, (VkFramebuffer) _object);
+
+ case VK_OBJECT_TYPE_COMMAND_BUFFER:
(object->destructor)(device, object, objType);
return VK_SUCCESS;
assert(obj_type == VK_OBJECT_TYPE_FRAMEBUFFER);
- anv_DestroyObject(anv_device_to_handle(device),
- VK_OBJECT_TYPE_DYNAMIC_VP_STATE,
- fb->vp_state);
-
- anv_device_free(device, fb);
+ anv_DestroyFramebuffer(anv_device_to_handle(device),
+ anv_framebuffer_to_handle(fb));
}
VkResult anv_CreateFramebuffer(
return VK_SUCCESS;
}
+VkResult anv_DestroyFramebuffer(
+ VkDevice _device,
+ VkFramebuffer _fb)
+{
+ ANV_FROM_HANDLE(anv_device, device, _device);
+ ANV_FROM_HANDLE(anv_framebuffer, fb, _fb);
+
+ anv_DestroyDynamicViewportState(anv_device_to_handle(device),
+ fb->vp_state);
+ anv_device_free(device, fb);
+
+ return VK_SUCCESS;
+}
+
VkResult anv_CreateRenderPass(
VkDevice _device,
const VkRenderPassCreateInfo* pCreateInfo,