> ## 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

> 指定要从深度模板视图中清除的内容。

指定要从深度模板视图中清除的内容。

## 语法

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

## 常量

| 常量                          | 说明          |
| --------------------------- | ----------- |
| D3D12\_CLEAR\_FLAG\_DEPTH   | 指示应清除深度缓冲区。 |
| D3D12\_CLEAR\_FLAG\_STENCIL | 指示应清除模板缓冲区。 |

## 注解

此枚举由 [ID3D12GraphicsCommandList::ClearDepthStencilView](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_cleardepthstencilview_public) 使用。
可以组合这些标志以全部清除。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[核心枚举](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-enumerations)


## Related topics

- [D3D12_SHADER_CACHE_CONTROL_FLAGS（XBOX Series 主机）](/zh-CN/reference/graphics/d3d12/enums/d3d12_shader_cache_control_flags_public.md)
- [D3D12_SHADER_CACHE_KIND_FLAGS（XBOX Series 主机）](/zh-CN/reference/graphics/d3d12/enums/d3d12_shader_cache_kind_flags_public.md)
- [D3D12_CLEAR_VALUE](/zh-CN/reference/graphics/d3d12/structs/d3d12_clear_value_public.md)
- [D3D12_DSV_FLAGS](/zh-CN/reference/graphics/d3d12/enums/d3d12_dsv_flags_public.md)
- [D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS](/zh-CN/reference/graphics/d3d12/structs/d3d12_render_pass_beginning_access_clear_parameters_public.md)
