---
title: Creating an indirect command buffer
framework: metal
role: article
role_heading: Article
path: metal/creating-an-indirect-command-buffer
---

# Creating an indirect command buffer

Configure a descriptor to specify the properties of an indirect command buffer.

## Overview

Overview An indirect command buffer stores encoded GPU commands persistently. Using an indirect command buffer, you can encode a command once and reuse it multiple times. You can also encode commands into an indirect command buffer simultaneously with multiple threads on the CPU or with a compute kernel on the GPU. To create an indirect command buffer, first create an MTLIndirectCommandBufferDescriptor instance and configure the descriptor’s properties. Then call makeIndirectCommandBuffer(descriptor:maxCommandCount:options:) on an MTLDevice instance to create the indirect command buffer.

## See Also

### Indirect command buffers

- [Specifying drawing and dispatch arguments indirectly](metal/specifying-drawing-and-dispatch-arguments-indirectly.md)
- [Encoding indirect command buffers on the CPU](metal/encoding-indirect-command-buffers-on-the-cpu.md)
- [Encoding indirect command buffers on the GPU](metal/encoding-indirect-command-buffers-on-the-gpu.md)
- [MTLIndirectCommandBuffer](metal/mtlindirectcommandbuffer.md)
- [MTLIndirectCommandBufferDescriptor](metal/mtlindirectcommandbufferdescriptor.md)
- [MTLIndirectCommandType](metal/mtlindirectcommandtype.md)
- [MTLIndirectCommandBufferExecutionRange](metal/mtlindirectcommandbufferexecutionrange.md)
- [MTLIndirectCommandBufferExecutionRangeMake(_:_:)](metal/mtlindirectcommandbufferexecutionrangemake(_:_:).md)
