SpiecsEngine
 
Loading...
Searching...
No Matches

◆ ~VulkanBuffer()

Spices::VulkanBuffer::~VulkanBuffer ( )
overridevirtual

Destructor Function.

Destroy Vkbuffer.

Destroy Vkbuffer.

Definition at line 35 of file VulkanBuffer.cpp.

36 {
38
39#if VMA_ALLOCATOR
40
44 vmaDestroyBuffer(m_VulkanState.m_VmaAllocator, m_Buffer, m_Alloc);
45
46#else
47
48 if (m_LocalMemory)
49 {
50 vkUnmapMemory(m_VulkanState.m_Device, m_BufferMemory);
51 }
52
56 vkDestroyBuffer(m_VulkanState.m_Device, m_Buffer, nullptr);
57 vkFreeMemory(m_VulkanState.m_Device, m_BufferMemory, nullptr);
58
59#endif
60
61 }
#define SPICES_PROFILE_ZONE
VkBuffer m_Buffer
The buffer this class handled.
VmaAllocation m_Alloc
VMA allocation.
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.
VmaAllocator m_VmaAllocator
Definition VulkanUtils.h:97