Function findMemoryTypeIndex

Find a memory type index suitable for the given allowedIndexMask and info.

uint findMemoryTypeIndex (
  in const(MemoryType[]) types,
  in const(uint) allowedIndexMask,
  in const(AllocOptions) options = AllocOptions(cast(AllocFlags)0, cast(MemoryUsage)0, cast(MemProps)0, cast(MemProps)0, 0u)
);

Parameters

NameDescription
types the memory types obtained from a device
allowedIndexMask the mask obtained from MemoryRequirements.memTypeMask
options an optional AllocOptions that will constraint the choice

Returns

the found index of memory type, or uint.max if none could satisfy requirements