pub unsafe extern "C" fn vmaFindMemoryTypeIndex(
    allocator: VmaAllocator,
    memoryTypeBits: u32,
    pAllocationCreateInfo: *const VmaAllocationCreateInfo,
    pMemoryTypeIndex: *mut u32
) -> Result
Expand description

\brief Helps to find memoryTypeIndex, given memoryTypeBits and VmaAllocationCreateInfo.

This algorithm tries to find a memory type that:

  • Is allowed by memoryTypeBits.
  • Contains all the flags from pAllocationCreateInfo->requiredFlags.
  • Matches intended usage.
  • Has as many flags from pAllocationCreateInfo->preferredFlags as possible.

\return Returns VK_ERROR_FEATURE_NOT_PRESENT if not found. Receiving such result from this function or any other allocating function probably means that your device doesn’t support any memory type with requested features for the specific type of resource you want to use it for. Please check parameters of your resource, like image layout (OPTIMAL versus LINEAR) or mip level count.