mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
vk_memory_manager: Make use of designated initializers where applicable
This commit is contained in:
parent
75c00c3cb0
commit
7d5f93832c
1 changed files with 6 additions and 7 deletions
|
@ -178,13 +178,12 @@ bool VKMemoryManager::AllocMemory(VkMemoryPropertyFlags wanted_properties, u32 t
|
||||||
}();
|
}();
|
||||||
|
|
||||||
// Try to allocate found type.
|
// Try to allocate found type.
|
||||||
VkMemoryAllocateInfo memory_ai;
|
vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory({
|
||||||
memory_ai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
|
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
|
||||||
memory_ai.pNext = nullptr;
|
.pNext = nullptr,
|
||||||
memory_ai.allocationSize = size;
|
.allocationSize = size,
|
||||||
memory_ai.memoryTypeIndex = type;
|
.memoryTypeIndex = type,
|
||||||
|
});
|
||||||
vk::DeviceMemory memory = device.GetLogical().TryAllocateMemory(memory_ai);
|
|
||||||
if (!memory) {
|
if (!memory) {
|
||||||
LOG_CRITICAL(Render_Vulkan, "Device allocation failed!");
|
LOG_CRITICAL(Render_Vulkan, "Device allocation failed!");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue