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

> 描述资源（例如纹理），包括 mip 区域。此结构在多个方法中使用。

描述资源（例如纹理），包括 mip 区域。此结构在多个方法中使用。

## 语法

```cpp theme={null}
typedef struct D3D12_RESOURCE_DESC1
{
    D3D12_RESOURCE_DIMENSION Dimension;
    UINT64 Alignment;
    UINT64 Width;
    UINT Height;
    UINT16 DepthOrArraySize;
    UINT16 MipLevels;
    DXGI_FORMAT Format;
    DXGI_SAMPLE_DESC SampleDesc;
    D3D12_TEXTURE_LAYOUT Layout;
    D3D12_RESOURCE_FLAGS Flags;
    D3D12_MIP_REGION SamplerFeedbackMipRegion;
} D3D12_RESOURCE_DESC1
```

### 成员

*Dimension*\
类型：D3D12\_RESOURCE\_DIMENSION

[D3D12\_RESOURCE\_DIMENSION](/reference/graphics/d3d12_x/enums/d3d12_resource_dimension) 的一个成员，用于指定资源的维度（例如 D3D12\_RESOURCE\_DIMENSION\_TEXTURE1D），或者它是否为缓冲区（D3D12\_RESOURCE\_DIMENSION\_BUFFER）。

*Alignment*\
类型：UINT64

指定对齐方式。

*Width*\
类型：UINT64

指定资源的宽度。

*Height*\
类型：UINT

指定资源的高度。

*DepthOrArraySize*\
类型：UINT16

如果资源为 3D，则指定资源的深度；如果它是 1D 或 2D 资源的数组，则指定数组大小。

*MipLevels*\
类型：UINT16

指定 MIP 级别数。

*Format*\
类型：DXGI\_FORMAT

指定 [DXGI\_FORMAT](https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format) 的一个成员。

*SampleDesc*\
类型：DXGI\_SAMPLE\_DESC

指定一个 [DXGI\_SAMPLE\_DESC](https://learn.microsoft.com/en-us/windows/win32/api/dxgicommon/ns-dxgicommon-dxgi_sample_desc) 结构。

*Layout*\
类型：D3D12\_TEXTURE\_LAYOUT

指定 [D3D12\_TEXTURE\_LAYOUT](/reference/graphics/d3d12_x/enums/d3d12_texture_layout) 的一个成员。

*Flags*\
类型：D3D12\_RESOURCE\_FLAGS

按位或运算的标志，作为 [D3D12\_RESOURCE\_FLAGS](/reference/graphics/d3d12_x/enums/d3d12_resource_flags) 枚举常量。

*SamplerFeedbackMipRegion*\
类型：D3D12\_MIP\_REGION

一个 [D3D12\_MIP\_REGION](/reference/graphics/d3d12_xs/structs/d3d12_mip_region) 结构。

## 备注

有关备注，请参阅 [D3D12\_RESOURCE\_DESC1](/reference/graphics/d3d12/structs/d3d12_resource_desc_public)。

## 要求

**头文件：** d3d12\_x.h\
**库：** d3d12\_x.lib\
**支持的平台**：XBOX One 系列

## 另请参阅

* [Core structures](https://learn.microsoft.com/en-us/windows/win32/direct3d12/direct3d-12-structures)

* [Sampler feedback specification](https://microsoft.github.io/DirectX-Specs/d3d/SamplerFeedback.html)


## Related topics

- [CreateCommittedResource3 (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device10/methods/id3d12device10_createcommittedresource3_public.md)
- [CreatePlacedResource2 (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device10/methods/id3d12device10_createplacedresource2_public.md)
- [D3D12_PROTECTED_RESOURCE_SESSION_DESC1](/zh-CN/reference/graphics/d3d12/structs/d3d12_protected_resource_session_desc1_public.md)
- [D3D12_DEPTH_STENCIL_DESC1](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc1_public.md)
- [D3D12_ROOT_SIGNATURE_DESC1](/zh-CN/reference/graphics/d3d12/structs/d3d12_root_signature_desc1_public.md)
