---
title: commandTypes
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlindirectcommandbufferdescriptor/commandtypes
---

# commandTypes

The set of command types that you can encode into the indirect command buffer.

## Declaration

```swift
var commandTypes: MTLIndirectCommandType { get set }
```

## Discussion

Discussion When you create the indirect command buffer, Metal allocates memory for each command it can hold. It needs to allocate enough memory to hold any command that you might later encode. To save space, specify only the command types you are going to encode in the indirect command buffer. You can’t combine rendering and compute commands in the same indirect command buffer.
