<!--
{
  "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/copyMappings(sourceTexture:destinationTexture:operations:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So16MTL4CommandQueueP5MetalE12copyMappings13sourceTexture011destinationH010operationsySo10MTLTexture_p_SoAH_pSaySo0a10CopySparseH16MappingOperationaGtF"
  },
  "title" : "copyMappings(sourceTexture:destinationTexture:operations:)"
}
-->

# copyMappings(sourceTexture:destinationTexture:operations:)

Copies multiple regions within a source placement sparse texture to a destination placement sparse texture.

```
func copyMappings(sourceTexture: any MTLTexture, destinationTexture: any MTLTexture, operations: [MTL4CopySparseTextureMappingOperation])
```

## Parameters

`sourceTexture`

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

`destinationTexture`

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

`operations`

An array of [`MTL4CopySparseTextureMappingOperation`](/documentation/Metal/MTL4CopySparseTextureMappingOperation) instances to perform.

## Discussion

You are responsible for ensuring the source and destination textures have the same
[`placementSparsePageSize`](/documentation/Metal/MTLTextureDescriptor/placementSparsePageSize).

Additionally, you are responsible for ensuring that the source and destination textures don’t use the same aliased tiles
at the same time.

> Note: If a sparse texture and a sparse buffer share the same backing tiles, these don’t provide you
> you with meaningful views of the other resource’s data.

---

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)