| 532 | if (result != VK_SUCCESS) |
| 533 | { |
| 534 | throw VulkanException{result, "Cannot create Image"}; |
| 535 | } |
| 536 | |
| 537 | post_create(allocation_info); |
| 538 | return image; |
| 539 | } |
| 540 | |
| 541 | template <vkb::BindingType bindingType, typename HandleType> |
| 542 | inline void Allocated<bindingType, HandleType>::destroy_buffer(BufferType handle) |
| 543 | { |
| 544 | if (handle != VK_NULL_HANDLE && allocation != VK_NULL_HANDLE) |
| 545 | { |
| 546 | unmap(); |
| 547 | if constexpr (bindingType == vkb::BindingType::Cpp) |
| 548 | { |
| 549 | vmaDestroyBuffer(get_memory_allocator(), static_cast<VkBuffer>(handle), allocation); |
| 550 | } |
| 551 | else |
| 552 | { |