---
title: MTL4CommandBuffer
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtl4commandbuffer
---

# MTL4CommandBuffer

Records a sequence of GPU commands.

## Declaration

```swift
protocol MTL4CommandBuffer : NSObjectProtocol
```

## Mentioned in

Understanding the Metal 4 core API

## Topics

### Instance Properties

- [device](metal/mtl4commandbuffer/device.md)
- [label](metal/mtl4commandbuffer/label.md)

### Instance Methods

- [beginCommandBuffer(allocator:)](metal/mtl4commandbuffer/begincommandbuffer(allocator:).md)
- [beginCommandBuffer(allocator:options:)](metal/mtl4commandbuffer/begincommandbuffer(allocator:options:).md)
- [endCommandBuffer()](metal/mtl4commandbuffer/endcommandbuffer().md)
- [makeComputeCommandEncoder()](metal/mtl4commandbuffer/makecomputecommandencoder().md)
- [makeMachineLearningCommandEncoder()](metal/mtl4commandbuffer/makemachinelearningcommandencoder().md)
- [makeRenderCommandEncoder(descriptor:options:)](metal/mtl4commandbuffer/makerendercommandencoder(descriptor:options:).md)
- [popDebugGroup()](metal/mtl4commandbuffer/popdebuggroup().md)
- [pushDebugGroup(_:)](metal/mtl4commandbuffer/pushdebuggroup(_:).md)
- [resolveCounterHeap(_:range:buffer:fenceToWait:fenceToUpdate:)](metal/mtl4commandbuffer/resolvecounterheap(_:range:buffer:fencetowait:fencetoupdate:).md)
- [useResidencySet(_:)](metal/mtl4commandbuffer/useresidencyset(_:).md)
- [useResidencySets(_:)](metal/mtl4commandbuffer/useresidencysets(_:).md)
- [writeTimestamp(counterHeap:index:)](metal/mtl4commandbuffer/writetimestamp(counterheap:index:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Submitting work to a GPU with Metal 4

- [MTL4CommandQueue](metal/mtl4commandqueue.md)
- [MTL4CommandQueueDescriptor](metal/mtl4commandqueuedescriptor.md)
- [MTL4CommandQueueError](metal/mtl4commandqueueerror-swift.struct.md)
- [MTL4CommandQueueError.Code](metal/mtl4commandqueueerror-swift.struct/code.md)
- [MTL4CommandQueueErrorDomain](metal/mtl4commandqueueerrordomain.md)
- [MTL4CommandBufferOptions](metal/mtl4commandbufferoptions.md)
- [MTL4CommandEncoder](metal/mtl4commandencoder.md)
- [MTL4RenderEncoderOptions](metal/mtl4renderencoderoptions.md)
- [MTL4ArgumentTable](metal/mtl4argumenttable.md)
- [MTL4ArgumentTableDescriptor](metal/mtl4argumenttabledescriptor.md)
- [MTL4CommandAllocator](metal/mtl4commandallocator.md)
- [MTL4CommandAllocatorDescriptor](metal/mtl4commandallocatordescriptor.md)
- [MTL4CommitOptions](metal/mtl4commitoptions.md)
- [MTL4CommitFeedback](metal/mtl4commitfeedback.md)
- [MTL4CommitFeedbackHandler](metal/mtl4commitfeedbackhandler.md)
