소스 검색

vk_memory_manager: Fixup commit interval allocation

VKMemoryCommitImpl was using as the end of its interval "begin + end".
That ended up wasting memory.
ReinUsesLisp 7 년 전
부모
커밋
92050c4d86
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/video_core/renderer_vulkan/vk_memory_manager.cpp

+ 1 - 2
src/video_core/renderer_vulkan/vk_memory_manager.cpp

@@ -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);