Fix linux build

This commit is contained in:
2020-05-24 23:14:11 +02:00
parent 7ac08ebc2c
commit c0a234ab06
11 changed files with 215 additions and 42 deletions

View File

@@ -217,12 +217,12 @@ namespace openVulkanoCpp
uint32_t offset = allocation->used;
device.bindBufferMemory(buffer, allocation->memory, offset);
allocation->used += memoryRequirements.size;
return new ManagedBuffer{ allocation, offset, size, buffer, usage, properties, device, nullptr };
return new ManagedBuffer{ allocation, offset, size, buffer, usage, properties, nullptr };
}
MemoryAllocation* CreateMemoryAllocation(size_t size, uint32_t type, bool addToCache = true)
{
MemoryAllocation* alloc = new MemoryAllocation(size, type);
MemoryAllocation* alloc = new MemoryAllocation(size, type, device);
const vk::MemoryAllocateInfo allocInfo = { size, type };
alloc->memory = device.allocateMemory(allocInfo);
if (addToCache) allocations.push_back(alloc);