---
name: "SDL_GPUDepthStencilState"
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_GPUDepthStencilState"
---

# SDL\_GPUDepthStencilState(3type)

A structure specifying the parameters of the graphics pipeline depth stencil state.

## NAME

SDL\_GPUDepthStencilState - A structure specifying the parameters of the graphics pipeline depth stencil state.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef struct SDL\_GPUDepthStencilState** **{**     **SDL\_GPUCompareOp compare\_op;                /\*\*\< The comparison operator used for depth testing. \*/**     **SDL\_GPUStencilOpState back\_stencil\_state;   /\*\*\< The stencil op state for back-facing triangles. \*/**     **SDL\_GPUStencilOpState front\_stencil\_state;  /\*\*\< The stencil op state for front-facing triangles. \*/**     **Uint8 compare\_mask;                         /\*\*\< Selects the bits of the stencil values participating in the stencil test. \*/**     **Uint8 write\_mask;                           /\*\*\< Selects the bits of the stencil values updated by the stencil test. \*/**     **bool enable\_depth\_test;                 /\*\*\< true enables the depth test. \*/**     **bool enable\_depth\_write;                /\*\*\< true enables depth writes. Depth writes are always disabled when enable\_depth\_test is false. \*/**     **bool enable\_stencil\_test;               /\*\*\< true enables the stencil test. \*/**     **Uint8 padding1;**     **Uint8 padding2;**     **Uint8 padding3;** **} SDL\_GPUDepthStencilState;**

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GPUGraphicsPipelineCreateInfo**(3type)](/SDL_GPUGraphicsPipelineCreateInfo/3type.md)
