---
title: "resetCommandsInBuffer(_:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlblitcommandencoder/resetcommandsinbuffer(_:range:)"
---

# resetCommandsInBuffer(_:range:)

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

## Declaration

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

## Parameters

- `buffer`: An indirect command buffer the command resets.
- `range`: A range of commands within buffer.

## See Also

### Managing indirect command buffers

- [copyIndirectCommandBuffer(_:sourceRange:destination:destinationIndex:)](metal/mtlblitcommandencoder/copyindirectcommandbuffer(_:sourcerange:destination:destinationindex:).md)
- [optimizeIndirectCommandBuffer(_:range:)](metal/mtlblitcommandencoder/optimizeindirectcommandbuffer(_:range:).md)
