makeBuffer(length:options:placementSparsePageSize:)
Creates a new placement sparse buffer of a specific length.
Declaration
func makeBuffer(length: Int, options: MTLResourceOptions = [], placementSparsePageSize: MTLSparsePageSize) -> (any MTLBuffer)?Parameters
- length:
The size of the Mtlbuffer, in bytes.
- options:
A Mtlresourceoptions instance that establishes the buffer’s storage modes.
- placementSparsePageSize:
Mtlsparsepagesize to use for the placement sparse buffer.
Return Value
A MTLBuffer instance, or nil if the function failed.
Discussion
This method creates a new placement sparse MTLBuffer of a specific length. You assign memory to placement sparse buffers using a MTLHeap of type MTLHeapType.placement.