---
title: "setVisibleFunctionTable(_:bufferIndex:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlcomputecommandencoder/setvisiblefunctiontable(_:bufferindex:)"
---

# setVisibleFunctionTable(_:bufferIndex:)

Binds a visible function table to the buffer argument table, allowing you to call its functions on the GPU.

## Declaration

```swift
func setVisibleFunctionTable(_ visibleFunctionTable: (any MTLVisibleFunctionTable)?, bufferIndex: Int)
```

## Parameters

- `visibleFunctionTable`: The doc://com.apple.metal/documentation/Metal/MTLVisibleFunctionTable to bind.
- `bufferIndex`: The index the function table binds to in the buffer argument table.

## See Also

### Binding function tables

- [setVisibleFunctionTables(_:bufferRange:)](metal/mtlcomputecommandencoder/setvisiblefunctiontables(_:bufferrange:).md)
- [setIntersectionFunctionTables(_:bufferRange:)](metal/mtlcomputecommandencoder/setintersectionfunctiontables(_:bufferrange:).md)
