<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4CommandQueue/updateMappings(texture:heap:operations:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So16MTL4CommandQueueP5MetalE14updateMappings7texture4heap10operationsySo10MTLTexture_p_So7MTLHeap_pSgSaySo0A35UpdateSparseTextureMappingOperationaGtF"
  },
  "title" : "updateMappings(texture:heap:operations:)"
}
-->

# updateMappings(texture:heap:operations:)

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

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

## Parameters

`texture`

A placement sparse [`MTLTexture`](/documentation/Metal/MTLTexture).

`heap`

[`MTLHeap`](/documentation/Metal/MTLHeap) you allocate with type [`MTLHeapType.placement`](/documentation/Metal/MTLHeapType/placement).

`operations`

An array of [`MTL4UpdateSparseTextureMappingOperation`](/documentation/Metal/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`](/documentation/Metal/MTLHeapDescriptor/maxCompatiblePlacementSparsePageSize) of at least the texture’s
[`placementSparsePageSize`](/documentation/Metal/MTLTextureDescriptor/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`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)