updateMappings(texture:heap:operations:)
Updates multiple regions within a placement sparse texture to alias specific tiles of a Metal heap.
Declaration
func updateMappings(texture: any MTLTexture, heap: (any MTLHeap)?, operations: [MTL4UpdateSparseTextureMappingOperation])Parameters
- texture:
A placement sparse Mtltexture.
- heap:
- operations:
An array of Mtl4updatesparsetexturemappingoperation instances to perform.
Discussion
You can provide a nil parameter to the heap argument only if when you perform unmap operations. Otherwise, you are responsible for ensuring the heap is non-nil and has a maxCompatiblePlacementSparsePageSize of at least the texture’s placementSparsePageSize.
When performing a sparse mapping update, you are responsible for issuing a barrier against stage MTLStageResourceState.
You can determine the sparse texture tier by calling MTLTexture/sparseTextureTier.