<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCounterSamplingPoint/atDispatchBoundary",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLCounterSamplingPoint@MTLCounterSamplingPointAtDispatchBoundary"
  },
  "title" : "MTLCounterSamplingPoint.atDispatchBoundary"
}
-->

# MTLCounterSamplingPoint.atDispatchBoundary

Counter sampling is allowed between kernel dispatches in a compute pass.

```
case atDispatchBoundary
```

## Discussion

When a Metal device instance supports this sampling boundary, you can call the [`sampleCounters(sampleBuffer:sampleIndex:barrier:)`](/documentation/Metal/MTLComputeCommandEncoder/sampleCounters(sampleBuffer:sampleIndex:barrier:)) method on an [`MTLComputeCommandEncoder`](/documentation/Metal/MTLComputeCommandEncoder) to sample the counters between individual dispatch commands.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)