<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCounterSampleBufferError-swift.struct/invalid",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:SC27MTLCounterSampleBufferErrorLeV7invalidSoAAVvpZ"
  },
  "title" : "invalid"
}
-->

# invalid

An error code that indicates the descriptor for creating a counter sample buffer descriptor has an invalid property.

```
static var invalid: MTLCounterSampleBufferError.Code { get }
```

## Discussion

This error applies to the [`MTLDevice`](/documentation/Metal/MTLDevice) protocol’s [`makeCounterSampleBuffer(descriptor:)`](/documentation/Metal/MTLDevice/makeCounterSampleBuffer(descriptor:)) method and its [`MTLCounterSampleBufferDescriptor`](/documentation/Metal/MTLCounterSampleBufferDescriptor) parameter.

---

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)