# GpuDepthStencilState

`import { GpuDepthStencilState } from "destack:gpu/binding";`

Depth-stencil-state descriptor.

```ds title="GpuDepthStencilState"
export struct GpuDepthStencilState {
    format: GpuTextureFormat;
    depthWriteEnabled: boolean;
    depthCompare: GpuCompareFunction;
    stencilFront: GpuStencilFaceState;
    stencilBack: GpuStencilFaceState;
    stencilReadMask: uint32;
    stencilWriteMask: uint32;
    depthBias: int32;
    depthBiasSlopeScale: float64;
    depthBiasClamp: float64;
}
```

[language/library/src/gpu/binding/pipeline.ds:405:426](https://github.com/destack-sh/destack/blob/main/language/library/src/gpu/binding/pipeline.ds#L405-L426)

## Members

### `format: GpuTextureFormat`

Depth-stencil texture format identifier.

### `depthWriteEnabled: boolean`

Whether depth writes are enabled.

### `depthCompare: GpuCompareFunction`

Depth compare selector.

### `stencilFront: GpuStencilFaceState`

Front-face stencil-state descriptor.

### `stencilBack: GpuStencilFaceState`

Back-face stencil-state descriptor.

### `stencilReadMask: uint32`

Stencil read mask.

### `stencilWriteMask: uint32`

Stencil write mask.

### `depthBias: int32`

Constant depth-bias value.

### `depthBiasSlopeScale: float64`

Depth-bias slope scale.

### `depthBiasClamp: float64`

Depth-bias clamp value.
