---
title: "makeIndirectCommandBuffer(descriptor:maxCommandCount:options:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makeindirectcommandbuffer(descriptor:maxcommandcount:options:)"
---

# makeIndirectCommandBuffer(descriptor:maxCommandCount:options:)

Creates an indirect command buffer instance.

## Declaration

```swift
func makeIndirectCommandBuffer(descriptor: MTLIndirectCommandBufferDescriptor, maxCommandCount maxCount: Int, options: MTLResourceOptions = []) -> (any MTLIndirectCommandBuffer)?
```

## Parameters

- `descriptor`: An doc://com.apple.metal/documentation/Metal/MTLIndirectCommandBufferDescriptor instance.
- `maxCount`: The largest number of commands you can store in the buffer.
- `options`: An doc://com.apple.metal/documentation/Metal/MTLResourceOptions instance.

## Mentioned in

Creating an indirect command buffer

## Return Value

Return Value A new MTLIndirectCommandBuffer instance if the method completed successfully; otherwise nil.
