---
title: "resetCommands(buffer:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4computecommandencoder/resetcommands(buffer:range:)"
---

# resetCommands(buffer:range:)

Encodes a command that resets a range of commands in an indirect command buffer.

## Declaration

```swift
func resetCommands(buffer: any MTLIndirectCommandBuffer, range: Range<Int>)
```

## Parameters

- `buffer`: An doc://com.apple.metal/documentation/Metal/MTLIndirectCommandBuffer the command resets.
- `range`: A range of commands within buffer.
