Function Allocator.tryAllocate

Attempt to allocate memory for the given index and for given requirements. If successful, result is filled with necessary data.

abstract bool tryAllocate (
  in const(MemoryRequirements) requirements,
  in const(uint) memoryTypeIndex,
  in const(AllocOptions) options,
  in const(ResourceLayout) layout,
  ref gfx.memalloc.AllocResult result
);

Returns

true if successful, false otherwise.