vk/image: Add an explicit DestroyImage function
This commit is contained in:
+3
-1
@@ -1171,8 +1171,10 @@ VkResult anv_DestroyObject(
|
||||
case VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW:
|
||||
return anv_DestroyDepthStencilView(_device, _object);
|
||||
|
||||
case VK_OBJECT_TYPE_BUFFER:
|
||||
case VK_OBJECT_TYPE_IMAGE:
|
||||
return anv_DestroyImage(_device, _object);
|
||||
|
||||
case VK_OBJECT_TYPE_BUFFER:
|
||||
case VK_OBJECT_TYPE_SHADER:
|
||||
case VK_OBJECT_TYPE_SHADER_MODULE:
|
||||
case VK_OBJECT_TYPE_PIPELINE_LAYOUT:
|
||||
|
||||
@@ -306,6 +306,16 @@ anv_CreateImage(VkDevice device,
|
||||
pImage);
|
||||
}
|
||||
|
||||
VkResult
|
||||
anv_DestroyImage(VkDevice _device, VkImage _image)
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||
|
||||
anv_device_free(device, anv_image_from_handle(_image));
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult anv_GetImageSubresourceLayout(
|
||||
VkDevice device,
|
||||
VkImage image,
|
||||
|
||||
@@ -943,6 +943,7 @@ anv_cmd_buffer_clear(struct anv_cmd_buffer *cmd_buffer,
|
||||
void *
|
||||
anv_lookup_entrypoint(const char *name);
|
||||
|
||||
VkResult anv_DestroyImage(VkDevice device, VkImage image);
|
||||
VkResult anv_DestroyImageView(VkDevice device, VkImageView imageView);
|
||||
VkResult anv_DestroyBufferView(VkDevice device, VkBufferView bufferView);
|
||||
VkResult anv_DestroyColorAttachmentView(VkDevice device,
|
||||
|
||||
Reference in New Issue
Block a user