Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VkMemoryAllocateInfo bufferAllocateInfo = {0};
- bufferAllocateInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
- bufferAllocateInfo.pNext = NULL;
- ...
- ...
- VkPhysicalDeviceMemoryProperties memoryProperties;
- vkGetPhysicalDeviceMemoryProperties(physicalDevice, &memoryProperties);
- for(uint32_t i = 0; i < memoryProperties.memoryTypeCount; ++i)
- {
- VkMemoryType memoryType = memoryProperties.memoryTypes[i];
- if(memoryType.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)
- {
- bufferAllocateInfo.memoryTypeIndex = i;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment