<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraphStencilOpDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders Graph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraphStencilOpDescriptor"
  },
  "title" : "MPSGraphStencilOpDescriptor"
}
-->

# MPSGraphStencilOpDescriptor

The class that defines the parameters for a stencil operation.

```
class MPSGraphStencilOpDescriptor
```

## Overview

Use this descriptor with the following [`MPSGraph`](/documentation/MetalPerformanceShadersGraph/MPSGraph) method:

- [`stencil(withSourceTensor:weightsTensor:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/stencil(withSourceTensor:weightsTensor:descriptor:name:))

---

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)