<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIContextOption/cvMetalTextureCache",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:@kCIContextCVMetalTextureCache"
  },
  "title" : "cvMetalTextureCache"
}
-->

# cvMetalTextureCache

A Core Video Metal texture cache object to improve the performance of Core Image context
renders that use Core Video pixel buffers.

```
static let cvMetalTextureCache: CIContextOption
```

## Discussion

Creating a Core Image context with this optional `CVMetalTextureCache` can improve the
performance of creating a Metal texture from a `CVPixelBuffer`. It is recommended
to specify this option if the context renders to or from pixel buffers that come
from a `CVPixelBufferPool`.

It is the client’s responsibility to flush the cache when appropriate.

---

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)