From 1dc5dd09a7d1c34ec8366dfcaa4235fb21148131 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sat, 8 May 2021 17:55:16 +0800 Subject: [PATCH] VKMemoryAllocator::Alloc() use new name AllocMemory(). --- inc/hgl/graph/VKMemoryAllocator.h | 2 +- src/SceneGraph/Vulkan/VKMemoryAllocator.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/hgl/graph/VKMemoryAllocator.h b/inc/hgl/graph/VKMemoryAllocator.h index 014b87c6..d8a7f953 100644 --- a/inc/hgl/graph/VKMemoryAllocator.h +++ b/inc/hgl/graph/VKMemoryAllocator.h @@ -15,7 +15,7 @@ class VKMemoryAllocator:public AbstractMemoryAllocator protected: - bool Alloc() override; + bool AllocMemory() override; public: diff --git a/src/SceneGraph/Vulkan/VKMemoryAllocator.cpp b/src/SceneGraph/Vulkan/VKMemoryAllocator.cpp index 2689c49c..9cbb1b7f 100644 --- a/src/SceneGraph/Vulkan/VKMemoryAllocator.cpp +++ b/src/SceneGraph/Vulkan/VKMemoryAllocator.cpp @@ -12,7 +12,7 @@ VKMemoryAllocator::VKMemoryAllocator(GPUDevice *d,const uint32_t flags) const GPUPhysicalDevice *pd=device->GetPhysicalDevice(); - SetAllocUnitSize(pd->GetConstantSize()); //据说push constant容量就是GPU的最小访问单位 + SetAllocUnitSize(pd->GetUBOAlign()); } VKMemoryAllocator::~VKMemoryAllocator() @@ -24,7 +24,7 @@ VKMemoryAllocator::~VKMemoryAllocator() } } -bool VKMemoryAllocator::Alloc() +bool VKMemoryAllocator::AllocMemory() { if(gpu_buffer) delete gpu_buffer;