<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCounterErrorValue",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@macro@MTLCounterErrorValue"
  },
  "title" : "MTLCounterErrorValue"
}
-->

# MTLCounterErrorValue

A sentinel value for an entry in a counter sample buffer that indicates the entry’s data is invalid.

```
var MTLCounterErrorValue: UInt64 { get }
```

## Discussion

A GPU driver typically sets entries to this value when it encounters an error resolving a counter’s data. The driver also uses this value for counters it doesn’t support within a counter set (see [Confirming which counters and counter sets a GPU supports](/documentation/Metal/confirming-which-counters-and-counter-sets-a-gpu-supports)).

---

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)