Contents

heapBufferSizeAndAlign(length:options:)

Returns the size and alignment, in bytes, of a buffer if you create it from a heap.

Declaration

func heapBufferSizeAndAlign(length: Int, options: MTLResourceOptions = []) -> MTLSizeAndAlign

Parameters

Return Value

An MTLSizeAndAlign instance.

Discussion

Use this method to help estimate an appropriate size for a new heap before you create it.

See Also

Working with resource heaps