Contents

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

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.