---
title: MTL4CommandEncoder
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtl4commandencoder
---

# MTL4CommandEncoder

An encoder that writes GPU commands into a command buffer.

## Declaration

```swift
protocol MTL4CommandEncoder : NSObjectProtocol
```

## Mentioned in

Understanding the Metal 4 core API

## Topics

### Instance Properties

- [commandBuffer](metal/mtl4commandencoder/commandbuffer.md)
- [label](metal/mtl4commandencoder/label.md)

### Instance Methods

- [barrier(afterEncoderStages:beforeEncoderStages:visibilityOptions:)](metal/mtl4commandencoder/barrier(afterencoderstages:beforeencoderstages:visibilityoptions:).md)
- [barrier(afterQueueStages:beforeStages:visibilityOptions:)](metal/mtl4commandencoder/barrier(afterqueuestages:beforestages:visibilityoptions:).md)
- [barrier(afterStages:beforeQueueStages:visibilityOptions:)](metal/mtl4commandencoder/barrier(afterstages:beforequeuestages:visibilityoptions:).md)
- [endEncoding()](metal/mtl4commandencoder/endencoding().md)
- [insertDebugSignpost(_:)](metal/mtl4commandencoder/insertdebugsignpost(_:).md)
- [popDebugGroup()](metal/mtl4commandencoder/popdebuggroup().md)
- [pushDebugGroup(_:)](metal/mtl4commandencoder/pushdebuggroup(_:).md)
- [updateFence(_:afterEncoderStages:)](metal/mtl4commandencoder/updatefence(_:afterencoderstages:).md)
- [waitForFence(_:beforeEncoderStages:)](metal/mtl4commandencoder/waitforfence(_:beforeencoderstages:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Inherited By

- [MTL4ComputeCommandEncoder](metal/mtl4computecommandencoder.md)
- [MTL4MachineLearningCommandEncoder](metal/mtl4machinelearningcommandencoder.md)
- [MTL4RenderCommandEncoder](metal/mtl4rendercommandencoder.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)
- [MTL4CommandBuffer](metal/mtl4commandbuffer.md)
- [MTL4CommandBufferOptions](metal/mtl4commandbufferoptions.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)
