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

> 定义 D3D12_DEVICE_REMOVED_EXTENDED_DATA 结构中使用的常量，用于为 Direct3D 运行时指定控制标志。

<Note>
  从 Windows 10 版本 1903 开始，**D3D12\_DRED\_FLAGS** 已弃用，在未来 Windows 版本中可能不可用。
</Note>

定义在 [D3D12\_DEVICE\_REMOVED\_EXTENDED\_DATA 结构](/reference/graphics/d3d12/structs/d3d12_device_removed_extended_data_public)中使用的常量，用于为 Direct3D 运行时指定控制标志。可以按位或组合各值。

## 语法

```cpp theme={null}
typedef enum D3D12_DRED_FLAGS
{
    D3D12_DRED_FLAG_NONE (0x0) = 0,
    D3D12_DRED_FLAG_FORCE_ENABLE (0x1) = 0,
    D3D12_DRED_FLAG_DISABLE_AUTOBREADCRUMBS (0x2) = 0
} D3D12_DRED_FLAGS
```

## 常量

| 常量                                                | 说明                                                                                     |
| ------------------------------------------------- | -------------------------------------------------------------------------------------- |
| D3D12\_DRED\_FLAG\_NONE (0x0)                     | 通常指定禁用"设备已移除的扩展数据"(DRED)，但以下情况除外：使用用户发起的反馈来生成复现，或 Windows 通过自动检测进程不稳定性问题以其他方式启用。这是默认值。 |
| D3D12\_DRED\_FLAG\_FORCE\_ENABLE (0x1)            | 强制启用 DRED，无论系统状态如何。                                                                    |
| D3D12\_DRED\_FLAG\_DISABLE\_AUTOBREADCRUMBS (0x2) | 禁用 DRED 自动面包屑。                                                                         |

## 注解

## 要求

**头文件：** 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)
* [D3D12\_DEVICE\_REMOVED\_EXTENDED\_DATA 结构](/reference/graphics/d3d12/structs/d3d12_device_removed_extended_data_public)
* [使用 DRED 诊断 GPU 故障](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/use-dred)


## Related topics

- [D3D12_DEVICE_REMOVED_EXTENDED_DATA](/zh-CN/reference/graphics/d3d12/structs/d3d12_device_removed_extended_data_public.md)
- [D3D12_DRED_ALLOCATION_TYPE](/zh-CN/reference/graphics/d3d12/enums/d3d12_dred_allocation_type_public.md)
- [D3D12_DRED_ENABLEMENT](/zh-CN/reference/graphics/d3d12/enums/d3d12_dred_enablement_public.md)
- [D3D12_DRED_VERSION](/zh-CN/reference/graphics/d3d12/enums/d3d12_dred_version_public.md)
- [D3D12_DRED_ALLOCATION_NODE](/zh-CN/reference/graphics/d3d12/structs/d3d12_dred_allocation_node_public.md)
