---
title: mode
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4updatesparsebuffermappingoperation/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 range in buffer offset 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 range, and ignores the value of member heapOffset.
