---
name: "SDL_GPUDepthStencilTargetInfo"
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_GPUDepthStencilTargetInfo"
---

# SDL\_GPUDepthStencilTargetInfo(3type)

A structure specifying the parameters of a depth-stencil target used by a render pass.

## NAME

SDL\_GPUDepthStencilTargetInfo - A structure specifying the parameters of a depth-stencil target used by a render pass.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

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

**typedef struct SDL\_GPUDepthStencilTargetInfo** **{**     **SDL\_GPUTexture \*texture;               /\*\*\< The texture that will be used as the depth stencil target by the render pass. \*/**     **float clear\_depth;                     /\*\*\< The value to clear the depth component to at the beginning of the render pass. Ignored if SDL\_GPU\_LOADOP\_CLEAR is not used. \*/**     **SDL\_GPULoadOp load\_op;                 /\*\*\< What is done with the depth contents at the beginning of the render pass. \*/**     **SDL\_GPUStoreOp store\_op;               /\*\*\< What is done with the depth results of the render pass. \*/**     **SDL\_GPULoadOp stencil\_load\_op;         /\*\*\< What is done with the stencil contents at the beginning of the render pass. \*/**     **SDL\_GPUStoreOp stencil\_store\_op;       /\*\*\< What is done with the stencil results of the render pass. \*/**     **bool cycle;                        /\*\*\< true cycles the texture if the texture is bound and any load ops are not LOAD \*/**     **Uint8 clear\_stencil;                   /\*\*\< The value to clear the stencil component to at the beginning of the render pass. Ignored if SDL\_GPU\_LOADOP\_CLEAR is not used. \*/**     **Uint8 padding1;**     **Uint8 padding2;** **} SDL\_GPUDepthStencilTargetInfo;**

## DESCRIPTION

The load\_op field determines what is done with the depth contents of the texture at the beginning of the render pass.

• LOAD: Loads the depth values currently in the texture.

• CLEAR: Clears the texture to a single depth.

• DONT\_CARE: The driver will do whatever it wants with the memory. This is\
   a good option if you know that every single pixel will be touched in the\
   render pass.

The store\_op field determines what is done with the depth results of the render pass.

• STORE: Stores the depth results in the texture.

• DONT\_CARE: The driver will do whatever it wants with the depth results.\
   This is often a good option for depth/stencil textures that don't need to\
   be reused again.

The stencil\_load\_op field determines what is done with the stencil contents of the texture at the beginning of the render pass.

• LOAD: Loads the stencil values currently in the texture.

• CLEAR: Clears the stencil values to a single value.

• DONT\_CARE: The driver will do whatever it wants with the memory. This is\
   a good option if you know that every single pixel will be touched in the\
   render pass.

The stencil\_store\_op field determines what is done with the stencil results of the render pass.

• STORE: Stores the stencil results in the texture.

• DONT\_CARE: The driver will do whatever it wants with the stencil results.\
   This is often a good option for depth/stencil textures that don't need to\
   be reused again.

Note that depth/stencil targets do not support multisample resolves.

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_BeginGPURenderPass**(3)](/SDL_BeginGPURenderPass/3.md)
