<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLResourceStateCommandEncoder/updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLResourceStateCommandEncoder(im)updateTextureMappings:mode:regions:mipLevels:slices:numRegions:"
  },
  "title" : "updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)"
}
-->

# updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)

Encodes a command to update memory mappings for multiple regions inside a texture.

```
func updateTextureMappings(_ texture: any MTLTexture, mode: MTLSparseTextureMappingMode, regions: UnsafePointer<MTLRegion>, mipLevels: UnsafePointer<Int>, slices: UnsafePointer<Int>, numRegions: Int)
```

## Parameters

`texture`

The sparse texture to update.

`mode`

The change to make to the texture mapping.

`regions`

A pointer to an array of regions to change. You need to provide as many regions as you specify in the `numRegions` parameter.

`mipLevels`

A pointer to an array of mipmap levels to change. You need to provide as many entries as you specify in the `numRegions` parameter.

`slices`

A pointer to an array of slices to change. You need to provide as many entries as you specify in the `numRegions` parameter.

`numRegions`

The number of regions to update.

## Discussion

---

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)