use MemoryAllocationInfo

This commit is contained in:
2020-12-01 10:56:05 +08:00
parent ce727cbb1a
commit 3e3b232af1
2 changed files with 2 additions and 7 deletions

View File

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