---
title: mode
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4updatesparsetexturemappingoperation/mode
---

# mode

The mode of the mapping operation to perform.

## Declaration

```swift
var mode: MTLSparseTextureMappingMode
```

## Discussion

Discussion When mode is MTLSparseTextureMappingMode.map, Metal walks the tiles in the region in X, Y, then Z order, assigning the next tile from the heap in increasing order, starting at heapOffset. When mode is MTLSparseTextureMappingMode.unmap, Metal unmaps the tiles in the region, ignoring the contents of member heapOffset.
