forked from ShuriZma/suyu
1
0
Fork 0

vk_memory_manager: Fixup commit interval allocation

VKMemoryCommitImpl was using as the end of its interval "begin + end".
That ended up wasting memory.
This commit is contained in:
ReinUsesLisp 2019-02-24 00:59:34 -03:00
parent 94b27bb8a5
commit 92050c4d86
1 changed files with 1 additions and 2 deletions

View File

@ -238,8 +238,7 @@ bool VKMemoryManager::AllocMemory(vk::MemoryPropertyFlags wanted_properties, u32
VKMemoryCommitImpl::VKMemoryCommitImpl(VKMemoryAllocation* allocation, vk::DeviceMemory memory,
u8* data, u64 begin, u64 end)
: allocation{allocation}, memory{memory}, data{data},
interval(std::make_pair(begin, begin + end)) {}
: allocation{allocation}, memory{memory}, data{data}, interval(std::make_pair(begin, end)) {}
VKMemoryCommitImpl::~VKMemoryCommitImpl() {
allocation->Free(this);