> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_CLEAR_FLAGS

> Specifies what to clear from the depth stencil view.

Specifies what to clear from the depth stencil view.

## Syntax

```cpp theme={null}
typedef enum D3D12_CLEAR_FLAGS
{
    D3D12_CLEAR_FLAG_DEPTH = 1,
    D3D12_CLEAR_FLAG_STENCIL = 2
} D3D12_CLEAR_FLAGS
```

## Constants

| Constant                    | Description                                     |
| --------------------------- | ----------------------------------------------- |
| D3D12\_CLEAR\_FLAG\_DEPTH   | Indicates the depth buffer should be cleared.   |
| D3D12\_CLEAR\_FLAG\_STENCIL | Indicates the stencil buffer should be cleared. |

## Remarks

This enum is used by [ID3D12GraphicsCommandList::ClearDepthStencilView](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_cleardepthstencilview_public).
The flags can be combined to clear all.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[Core Enumerations](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-enumerations)


## Related topics

- [D3D12_SHADER_CACHE_CONTROL_FLAGS (XBOX Series consoles)](/reference/graphics/d3d12/enums/d3d12_shader_cache_control_flags_public.md)
- [D3D12_SHADER_CACHE_KIND_FLAGS (XBOX Series consoles)](/reference/graphics/d3d12/enums/d3d12_shader_cache_kind_flags_public.md)
- [D3D12_CLEAR_VALUE](/reference/graphics/d3d12/structs/d3d12_clear_value_public.md)
- [D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS](/reference/graphics/d3d12/structs/d3d12_render_pass_beginning_access_clear_parameters_public.md)
- [D3D12_FENCE_FLAGS](/reference/graphics/d3d12/enums/d3d12_fence_flags_public.md)
