---
title: "updateMappings(texture:heap:operations:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4commandqueue/updatemappings(texture:heap:operations:)"
---

# updateMappings(texture:heap:operations:)

Updates multiple regions within a placement sparse texture to alias specific tiles of a Metal heap.

## Declaration

```swift
func updateMappings(texture: any MTLTexture, heap: (any MTLHeap)?, operations: [MTL4UpdateSparseTextureMappingOperation])
```

## Parameters

- `texture`: A placement sparse doc://com.apple.metal/documentation/Metal/MTLTexture.
- `heap`: doc://com.apple.metal/documentation/Metal/MTLHeap you allocate with type doc://com.apple.metal/documentation/Metal/MTLHeapType/placement.
- `operations`: An array of doc://com.apple.metal/documentation/Metal/MTL4UpdateSparseTextureMappingOperation instances to perform.

## Discussion

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.
