---
title: MTLIndirectComputeCommand
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlindirectcomputecommand
---

# MTLIndirectComputeCommand

A compute command in an indirect command buffer.

## Declaration

```swift
protocol MTLIndirectComputeCommand : NSObjectProtocol
```

## Overview

Overview Don’t implement this protocol; you get instances of this type by asking an MTLIndirectCommandBuffer for them. Use this instance to reset or encode a command. You need to reset a command before encoding a new command.

## Topics

### Setting a command’s arguments

- [setComputePipelineState(_:)](metal/mtlindirectcomputecommand/setcomputepipelinestate(_:).md)
- [setImageblockWidth(_:height:)](metal/mtlindirectcomputecommand/setimageblockwidth(_:height:).md)
- [setKernelBuffer(_:offset:at:)](metal/mtlindirectcomputecommand/setkernelbuffer(_:offset:at:).md)
- [setThreadgroupMemoryLength(_:index:)](metal/mtlindirectcomputecommand/setthreadgroupmemorylength(_:index:).md)
- [setThreadgroupMemoryLength(_:at:)](metal/mtlindirectcomputecommand/setthreadgroupmemorylength(_:at:).md)
- [setStageInRegion(_:)](metal/mtlindirectcomputecommand/setstageinregion(_:).md)
- [setStageIn(_:)](metal/mtlindirectcomputecommand/setstagein(_:).md)

### Synchronizing command execution

- [setBarrier()](metal/mtlindirectcomputecommand/setbarrier().md)
- [clearBarrier()](metal/mtlindirectcomputecommand/clearbarrier().md)

### Encoding a compute command

- [concurrentDispatchThreadgroups(_:threadsPerThreadgroup:)](metal/mtlindirectcomputecommand/concurrentdispatchthreadgroups(_:threadsperthreadgroup:).md)
- [concurrentDispatchThreads(_:threadsPerThreadgroup:)](metal/mtlindirectcomputecommand/concurrentdispatchthreads(_:threadsperthreadgroup:).md)

### Resetting a command

- [reset()](metal/mtlindirectcomputecommand/reset().md)

### Instance Methods

- [setKernelBuffer(_:offset:attributeStride:at:)](metal/mtlindirectcomputecommand/setkernelbuffer(_:offset:attributestride:at:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Indirect compute commands

- [MTLRegion](metal/mtlregion.md)
- [MTLSize](metal/mtlsize.md)
- [MTLOrigin](metal/mtlorigin.md)
- [MTLStageInRegionIndirectArguments](metal/mtlstageinregionindirectarguments.md)
- [MTLDispatchThreadgroupsIndirectArguments](metal/mtldispatchthreadgroupsindirectarguments.md)
