From 4795cdfc7936ac89da46f4d6f9de33fd481933a4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 8 Mar 2022 15:58:57 +0200 Subject: [PATCH] Minor tweaks to MemoryAllocator --- source/backends/vulkan/memoryallocator.cpp | 6 +++--- source/backends/vulkan/memoryallocator.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/backends/vulkan/memoryallocator.cpp b/source/backends/vulkan/memoryallocator.cpp index 4b3595b6..82155faf 100644 --- a/source/backends/vulkan/memoryallocator.cpp +++ b/source/backends/vulkan/memoryallocator.cpp @@ -56,7 +56,7 @@ MemoryAllocator::~MemoryAllocator() vk.FreeMemory(r.memory); } -unsigned MemoryAllocator::find_memory_pool(unsigned mask, MemoryType type) +unsigned MemoryAllocator::find_memory_pool(unsigned mask, MemoryType type) const { for(unsigned i=0; i::iterator MemoryAllocator::lower_bound_by_size(vector &indices, size_t size) +vector::iterator MemoryAllocator::lower_bound_by_size(vector &indices, size_t size) const { return lower_bound(indices, size, [this](unsigned j, unsigned s){ return blocks[j].size::iterator lower_bound_by_size(std::vector &, std::size_t); + std::vector::iterator lower_bound_by_size(std::vector &, std::size_t) const; unsigned allocate(std::size_t, std::size_t, unsigned, MemoryType); unsigned split_block(unsigned, std::size_t); void consolidate(unsigned); -- 2.45.2