---
name: "SDL_GPUStencilOpState"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GPUStencilOpState"
---

# SDL\_GPUStencilOpState(3type)

A structure specifying the stencil operation state of a graphics pipeline.

## NAME

SDL\_GPUStencilOpState - A structure specifying the stencil operation state of a graphics pipeline.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef struct SDL\_GPUStencilOpState** **{**     **SDL\_GPUStencilOp fail\_op;        /\*\*\< The action performed on samples that fail the stencil test. \*/**     **SDL\_GPUStencilOp pass\_op;        /\*\*\< The action performed on samples that pass the depth and stencil tests. \*/**     **SDL\_GPUStencilOp depth\_fail\_op;  /\*\*\< The action performed on samples that pass the stencil test and fail the depth test. \*/**     **SDL\_GPUCompareOp compare\_op;     /\*\*\< The comparison operator used in the stencil test. \*/** **} SDL\_GPUStencilOpState;**

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GPUDepthStencilState**(3type)](/SDL_GPUDepthStencilState/3type.md)
