---
title: "setTileBufferOffset(_:index:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrendercommandencoder/settilebufferoffset(_:index:)"
---

# setTileBufferOffset(_:index:)

Updates an entry in the tile shader argument table with a new location within the entry’s current buffer.

## Declaration

```swift
func setTileBufferOffset(_ offset: Int, index: Int)
```

## Parameters

- `offset`: An integer that represents the location, in bytes, from the start of buffer where the tile shader argument data begins. See the https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf to check for offset alignment requirements for buffers in device and constant address space.
- `index`: An integer that represents the entry in the tile shader argument table for buffers that already stores a record of an doc://com.apple.metal/documentation/Metal/MTLBuffer.

## Discussion

Discussion The command this method encodes changes the offset for a fragment buffer that already has a previous assignment from one of your earlier commands. For more information, see: setTileBuffer(_:offset:index:) setTileBuffers(_:offsets:range:) (Swift) setTileBuffers:offsets:withRange: (Objective-C) The command can also adjust the offset for an entry that you previously set with the setTileBytes(_:length:index:) method. tip: If you’re only updating an offset, this method is typically more efficient than rebinding a buffer or byte block with the methods above. By default, the buffer at each index is nil.

## See Also

### Assigning buffers

- [setTileBuffer(_:offset:index:)](metal/mtlrendercommandencoder/settilebuffer(_:offset:index:).md)
- [setTileBuffers(_:offsets:range:)](metal/mtlrendercommandencoder/settilebuffers(_:offsets:range:).md)
- [setTileBytes(_:length:index:)](metal/mtlrendercommandencoder/settilebytes(_:length:index:).md)
