Contents

updateMappings(buffer:heap:operations:)

Updates multiple regions within a placement sparse buffer to alias specific tiles from a Metal heap.

Declaration

func updateMappings(buffer: any MTLBuffer, heap: (any MTLHeap)?, operations: [MTL4UpdateSparseBufferMappingOperation])

Parameters

Discussion

You can provide a nil parameter to the heap argument only when you perform unmap operations. Otherwise, you are responsible for ensuring parameter heap references an MTLHeap that has a maxCompatiblePlacementSparsePageSize of at least the buffer’s placementSparsePageSize you assign when creating the sparse buffer via makeBuffer(length:options:placementSparsePageSize:).