---
title: endEncoding()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtlcommandencoder/endencoding()
---

# endEncoding()

Declares that all command generation from the encoder is completed.

## Declaration

```swift
func endEncoding()
```

## Discussion

Discussion After endEncoding is called, the command encoder has no further use. You cannot encode any other commands with this encoder.

## See Also

### Related Documentation

- [Metal Shading Language Guide](apple-archive/documentation/Metal/Reference/MetalShadingLanguageGuide/Introduction.md)
- [Metal Programming Guide](apple-archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Introduction.md)
