Skip to content
Snippets Groups Projects
Commit 92050c4d authored by ReinUsesLisp's avatar ReinUsesLisp
Browse files

vk_memory_manager: Fixup commit interval allocation

VKMemoryCommitImpl was using as the end of its interval "begin + end".
That ended up wasting memory.
parent 94b27bb8
No related branches found
No related tags found
No related merge requests found
...@@ -238,8 +238,7 @@ bool VKMemoryManager::AllocMemory(vk::MemoryPropertyFlags wanted_properties, u32 ...@@ -238,8 +238,7 @@ bool VKMemoryManager::AllocMemory(vk::MemoryPropertyFlags wanted_properties, u32
VKMemoryCommitImpl::VKMemoryCommitImpl(VKMemoryAllocation* allocation, vk::DeviceMemory memory, VKMemoryCommitImpl::VKMemoryCommitImpl(VKMemoryAllocation* allocation, vk::DeviceMemory memory,
u8* data, u64 begin, u64 end) u8* data, u64 begin, u64 end)
: allocation{allocation}, memory{memory}, data{data}, : allocation{allocation}, memory{memory}, data{data}, interval(std::make_pair(begin, end)) {}
interval(std::make_pair(begin, begin + end)) {}
VKMemoryCommitImpl::~VKMemoryCommitImpl() { VKMemoryCommitImpl::~VKMemoryCommitImpl() {
allocation->Free(this); allocation->Free(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment