---
title: "copyStatus(buffer:offset:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtliocommandbuffer/copystatus(buffer:offset:)"
---

# copyStatus(buffer:offset:)

Encodes a command that writes the input/output command buffer’s status to a buffer.

## Declaration

```swift
func copyStatus(buffer: any MTLBuffer, offset: Int)
```

## Parameters

- `buffer`: A buffer instance the method copies the status into.
- `offset`: A starting location relative to the beginning of the buffer, in bytes, the method copies data to.

## See Also

### Adding final commands

- [addCompletedHandler(_:)](metal/mtliocommandbuffer/addcompletedhandler(_:).md)
