return true;
}
+
+void vku_free(VkDeviceMemory gpu_memory)
+{
+ vkFreeMemory(vk_device, gpu_memory, 0);
+}
bool vku_allocate(int size, DevMemBlock *block);
void vku_free(VkDeviceMemory gpu_memory);
+bool vku_map_memory(VkDeviceMemory gpu_mem, int size, void *data);
+void vku_unmap_memory(VkDeviceMemory gpu_mem);
+
#endif // ALLOCATOR_H_
//TODO this is going to change when we allocate one mem block for all data,
//for the moment we map each buffer memory block and we set the data
-
return true;
}
void vku_destroy_buffer(struct vku_buffer *buf)
{
if(buf) {
+ //TODO change when the allocator changes
+ vku_free(buf->mem_pool);
+
vkDestroyBuffer(vk_device, buf->buf, 0);
delete buf;
}