---
title: "makeCommandQueue(maxCommandBufferCount:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makecommandqueue(maxcommandbuffercount:)"
---

# makeCommandQueue(maxCommandBufferCount:)

Creates a queue you use to submit rendering and computation commands to a GPU that has a fixed number of uncompleted command buffers.

## Declaration

```swift
func makeCommandQueue(maxCommandBufferCount: Int) -> (any MTLCommandQueue)?
```

## Parameters

- `maxCommandBufferCount`: An integer that sets the maximum number of uncompleted command buffers the queue can allow.

## Return Value

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

## Discussion

Discussion A Command queue can only submit commands to the GPU device instance that created it.

## See Also

### Creating command queues

- [makeCommandQueue()](metal/mtldevice/makecommandqueue().md)
