From 3e3b232af11ba59c276f131e091b0151fda667a1 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Tue, 1 Dec 2020 10:56:05 +0800 Subject: [PATCH] use MemoryAllocationInfo --- CMSceneGraph | 2 +- src/SceneGraph/Vulkan/VKMemory.cpp | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CMSceneGraph b/CMSceneGraph index 0f2586f9..aaf99835 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 0f2586f9c3a4477849febb70e59bbd195bf931fb +Subproject commit aaf998351f639a3854b0d99340ccf68337d6f767 diff --git a/src/SceneGraph/Vulkan/VKMemory.cpp b/src/SceneGraph/Vulkan/VKMemory.cpp index b7420d6a..cfe975f8 100644 --- a/src/SceneGraph/Vulkan/VKMemory.cpp +++ b/src/SceneGraph/Vulkan/VKMemory.cpp @@ -9,12 +9,7 @@ GPUMemory *GPUDevice::CreateMemory(const VkMemoryRequirements &req,uint32_t prop if(!attr->physical_device->CheckMemoryType(req.memoryTypeBits,properties,&index)) return(nullptr); - VkMemoryAllocateInfo alloc_info; - - alloc_info.sType =VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - alloc_info.pNext =nullptr; - alloc_info.memoryTypeIndex =index; - alloc_info.allocationSize =req.size; + MemoryAllocateInfo alloc_info(index,req.size); VkDeviceMemory memory;