---
title: "setStencilStoreAction(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4rendercommandencoder/setstencilstoreaction(_:)"
---

# setStencilStoreAction(_:)

Configures the store action for the stencil attachment.

## Declaration

```swift
func setStencilStoreAction(_ storeAction: MTLStoreAction)
```

## Parameters

- `storeAction`: A store action for the stencil attachment that can’t be doc://com.apple.metal/documentation/Metal/MTLStoreAction/unknown.

## See Also

### Configuring the actions for attachments

- [setColorStoreAction(_:index:)](metal/mtl4rendercommandencoder/setcolorstoreaction(_:index:).md)
- [setDepthStoreAction(_:)](metal/mtl4rendercommandencoder/setdepthstoreaction(_:).md)
