SDL_GPUDepthStencilTargetInfo Struct Reference

`#include <SDL_gpu.h>`

## Data Fields

SDL_GPUTexture * | texture
float | clear_depth
SDL_GPULoadOp | load_op
SDL_GPUStoreOp | store_op
SDL_GPULoadOp | stencil_load_op
SDL_GPUStoreOp | stencil_store_op
bool | cycle
Uint8 | clear_stencil
Uint8 | mip_level
Uint8 | layer

## Detailed Description

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

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.

Due to ABI limitations, depth textures with more than 255 layers are not supported.

Since
  This struct is available since SDL 3.2.0.

See also
  SDL_BeginGPURenderPass

Definition at line 2081 of file SDL_gpu.h.

## Field Documentation

## clear_depth

float SDL_GPUDepthStencilTargetInfo::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.

Definition at line 2084 of file SDL_gpu.h.

## clear_stencil

Uint8 SDL_GPUDepthStencilTargetInfo::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.

Definition at line 2090 of file SDL_gpu.h.

## cycle

bool SDL_GPUDepthStencilTargetInfo::cycle

true cycles the texture if the texture is bound and any load ops are not LOAD

Definition at line 2089 of file SDL_gpu.h.

## layer

Uint8 SDL_GPUDepthStencilTargetInfo::layer

The layer index to use as the depth stencil target.

Definition at line 2092 of file SDL_gpu.h.

## load_op

SDL_GPULoadOp SDL_GPUDepthStencilTargetInfo::load_op

What is done with the depth contents at the beginning of the render pass.

Definition at line 2085 of file SDL_gpu.h.

## mip_level

Uint8 SDL_GPUDepthStencilTargetInfo::mip_level

The mip level to use as the depth stencil target.

Definition at line 2091 of file SDL_gpu.h.

## stencil_load_op

SDL_GPULoadOp SDL_GPUDepthStencilTargetInfo::stencil_load_op

What is done with the stencil contents at the beginning of the render pass.

Definition at line 2087 of file SDL_gpu.h.

## stencil_store_op

SDL_GPUStoreOp SDL_GPUDepthStencilTargetInfo::stencil_store_op

What is done with the stencil results of the render pass.

Definition at line 2088 of file SDL_gpu.h.

## store_op

SDL_GPUStoreOp SDL_GPUDepthStencilTargetInfo::store_op

What is done with the depth results of the render pass.

Definition at line 2086 of file SDL_gpu.h.

## texture

SDL_GPUTexture* SDL_GPUDepthStencilTargetInfo::texture

The texture that will be used as the depth stencil target by the render pass.

Definition at line 2083 of file SDL_gpu.h.

The documentation for this struct was generated from the following file:

- SDL_gpu.h