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
- buffer:
A placement sparse Mtlbuffer.
- heap:
- operations:
An array of Mtl4updatesparsebuffermappingoperation instances to perform.
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:).