---
title: "setTileAccelerationStructure(_:bufferIndex:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrendercommandencoder/settileaccelerationstructure(_:bufferindex:)"
---

# setTileAccelerationStructure(_:bufferIndex:)

Assigns an acceleration structure to an entry in the tile shader argument table.

## Declaration

```swift
func setTileAccelerationStructure(_ accelerationStructure: (any MTLAccelerationStructure)?, bufferIndex: Int)
```

## Parameters

- `accelerationStructure`: An doc://com.apple.metal/documentation/Metal/MTLAccelerationStructure instance the command assigns to an entry in the tile shader argument table for acceleration structures.
- `bufferIndex`: An integer that represents the entry in the tile shader argument table for acceleration structures that stores a record of accelerationStructure.

## Discussion

Discussion By default, the acceleration structure at each index is nil.
