memoryTypeIndex
memoryTypeIndex is an index used in Vulkan to select a specific memory type for a device memory allocation. It refers to an entry in the physical device’s memoryTypes array, where each memory type describes a combination of properties (such as host visibility or device locality) and a memory heap. The memory types are enumerated by the physical device memory properties and identified by their indices.
In Vulkan, memory allocation begins with querying the resource’s memory requirements. This yields a memoryTypeBits bitmask
If no memory type satisfies both the compatibility and the desired properties, the allocation cannot proceed.
MemoryTypeIndex is a required field for vkAllocateMemory and must be a valid, in-range index that matches the
See also: VkMemoryAllocateInfo, VkPhysicalDeviceMemoryProperties, VkMemoryRequirements, vkAllocateMemory.