Skip to content
Snippets Groups Projects
Commit da47dcd8 authored by Pablo Escobar's avatar Pablo Escobar
Browse files

allow using a custom VmaAllocator in allocator

parent a8524cf4
No related branches found
No related tags found
No related merge requests found
......@@ -126,6 +126,10 @@ namespace lava {
check(vmaCreateAllocator(&allocator_info, &vma_allocator));
}
allocator::allocator(VmaAllocator allocator) {
vma_allocator = allocator;
}
allocator::~allocator() {
if (!vma_allocator)
return;
......
......@@ -15,6 +15,7 @@ namespace lava {
struct allocator {
explicit allocator(VkPhysicalDevice physical_device, VkDevice device);
explicit allocator(VmaAllocator allocator);
~allocator();
using ptr = std::shared_ptr<allocator>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment