<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCommandBuffer/status",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLCommandBuffer(py)status"
  },
  "title" : "status"
}
-->

# status

The command buffer’s current state.

```
var status: MTLCommandBufferStatus { get }
```

## Discussion

Each command buffer can be in any one of the following states:

|State                                                                           |Meaning                                                                                                                                                                                                                       |
|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|``doc://com.apple.metal/documentation/Metal/MTLCommandBufferStatus/notEnqueued``|A command buffer’s initial state, which indicates its command queue isn’t reserving a place for it. ![](spacer) You can modify a command buffer in this state by encoding commands to it, or by adding a state change handler.|
|``doc://com.apple.metal/documentation/Metal/MTLCommandBufferStatus/enqueued``   |A command buffer’s second state, which indicates its command queue is reserving a place for it. ![](spacer) You can modify a command buffer in this state by encoding commands to it, or by adding a state change handler.    |
|``doc://com.apple.metal/documentation/Metal/MTLCommandBufferStatus/committed``  |A command buffer’s third state, which indicates the command queue is preparing to schedule the command buffer by resolving its dependencies. ![](spacer) You can’t modify a command buffer in this state.                     |
|``doc://com.apple.metal/documentation/Metal/MTLCommandBufferStatus/scheduled``  |A command buffer’s fourth state, which indicates the command buffer has its resources ready and is waiting for the GPU to run its commands. ![](spacer) You can’t modify a command buffer in this state.                      |
|``doc://com.apple.metal/documentation/Metal/MTLCommandBufferStatus/completed``  |A command buffer’s successful, final state, which indicates the GPU finished running the command buffer’s commands without any problems.                                                                                      |
|``doc://com.apple.metal/documentation/Metal/MTLCommandBufferStatus/error``      |A command buffer’s unsuccessful, final state, which indicates the GPU stopped running the buffer’s commands because of a runtime issue.                                                                                       |

The first two states ([`MTLCommandBufferStatus.notEnqueued`](/documentation/Metal/MTLCommandBufferStatus/notEnqueued) and [`MTLCommandBufferStatus.enqueued`](/documentation/Metal/MTLCommandBufferStatus/enqueued)) both indicate that you can encode commands to the command buffer. You do this by creating an encoder that indirectly adds commands for a pass (see [Command encoder factory methods](/documentation/Metal/command-encoder-factory-methods)) to the command buffer. Command buffers also have some methods that directly encode commands between passes, such as [`encodeSignalEvent(_:value:)`](/documentation/Metal/MTLCommandBuffer/encodeSignalEvent(_:value:)) and [`present(_:)`](/documentation/Metal/MTLCommandBuffer/present(_:)).

Each command buffer’s state can only change to a state below it in the table, and ends its life cycle at either [`MTLCommandBufferStatus.completed`](/documentation/Metal/MTLCommandBufferStatus/completed) or [`MTLCommandBufferStatus.error`](/documentation/Metal/MTLCommandBufferStatus/error).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)