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

> 描述分配资源所需的参数。

描述分配资源所需的参数。

## 语法

```cpp theme={null}
typedef struct D3D12_RESOURCE_ALLOCATION_INFO
{
    UINT64 SizeInBytes;
    UINT64 Alignment;
} D3D12_RESOURCE_ALLOCATION_INFO
```

### 成员

*SizeInBytes*\
类型：UINT64

资源的大小（以字节为单位）。

*Alignment*\
类型：UINT64

资源的对齐值；为 4KB (4096)、64KB (65536) 或 4MB (4194304) 对齐之一。

## 备注

此结构由 [ID3D12Device::GetResourceAllocationInfo](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_getresourceallocationinfo_public) 和 [ID3D12Device::GetResourceAllocationInfo1](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_getresourceallocationinfo1_public) 方法使用。

## 要求

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

## 另请参阅

[CD3DX12\_RESOURCE\_ALLOCATION\_INFO](https://learn.microsoft.com/en-us/windows/win32/direct3d12/cd3dx12-resource-allocation-info)

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


## Related topics

- [GetResourceAllocationInfo](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_getresourceallocationinfo_public.md)
- [GetResourceAllocationInfo1 (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_getresourceallocationinfo1_public.md)
- [D3D12_RESOURCE_ALLOCATION_INFO1](/zh-CN/reference/graphics/d3d12/structs/d3d12_resource_allocation_info1_public.md)
- [D3D12_DRED_ALLOCATION_TYPE](/zh-CN/reference/graphics/d3d12/enums/d3d12_dred_allocation_type_public.md)
- [D3D12_DRED_ALLOCATION_NODE](/zh-CN/reference/graphics/d3d12/structs/d3d12_dred_allocation_node_public.md)
