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

> 描述並排顯示區域的大小。(D3D12_TILE_REGION_SIZE)

描述並排顯示區域的大小。

## 語法

```cpp theme={null}
typedef struct D3D12_TILE_REGION_SIZE
{
    UINT NumTiles;
    BOOL UseBox;
    UINT Width;
    UINT16 Height;
    UINT16 Depth;
} D3D12_TILE_REGION_SIZE
```

### 成員

*NumTiles*\
類型：UINT

並排顯示區域中的圖格數目。

*UseBox*\
類型：BOOL

指定執行階段是否使用 **Width**、**Height** 和 **Depth** 成員來定義區域。

如果為 **TRUE**，執行階段會使用 **Width**、**Height** 和 **Depth** 成員來定義區域。在此情況下，**NumTiles** 應等於 **Width** \* **Height** \* **Depth**。

如果為 **FALSE**，執行階段會忽略 **Width**、**Height** 和 **Depth** 成員，並使用 **NumTiles** 成員依序沿著 x、y、z (如適用) 線性周遊資源中的圖格，然後依子資源順序溢出至 MIP 對應/陣列。例如，使用此技巧可一次對應整個資源。

無論您為 **UseBox** 指定 **TRUE** 或 **FALSE**，都會使用 [D3D12\_TILED\_RESOURCE\_COORDINATE](/zh-TW/reference/graphics/d3d12/structs/d3d12_tiled_resource_coordinate_public) 結構，以 x、y 和 z 座標，在此結構外部以個別參數指定資源中區域的起始位置。

當區域包含以非標準並排顯示封裝的 MIP 對應時，**UseBox** 必須為 **FALSE**，因為圖格維度不是標準的，而且應用程式只知道封裝區域所耗用的圖格數目 (以每個陣列配量計算)。在此情況下，對應的 (個別) 起始位置參數會使用 x 來位移至圖格的平面範圍，而 y 和 z 座標都必須為 0。

*Width*\
類型：UINT

並排顯示區域的寬度 (以圖格為單位)。用於緩衝區及 1D、2D 和 3D 紋理。

*Height*\
類型：UINT16

並排顯示區域的高度 (以圖格為單位)。用於 2D 和 3D 紋理。

*Depth*\
類型：UINT16

並排顯示區域的深度 (以圖格為單位)。用於 3D 紋理或陣列。對於陣列，用於在深度上前進時跳至相同 MIP 對應大小的下一個配量；如果有多個 MIP 對應，這在子資源計數空間中並不連續。

## 備註

此結構由 [CopyTiles](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copytiles_public)、[CopyTileMappings](/zh-TW/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_copytilemappings_public) 和 [UpdateTileMappings](/zh-TW/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_updatetilemappings_public) 方法使用。

## 需求

**標頭:** d3d12\_xs.h 或 d3d12\_x.h\
**程式庫:** d3d12\_xs.lib 或 d3d12\_x.lib\
**支援的平台**: XBOX Series 主機與 XBOX One 系列

## 另請參閱

[CD3DX12\_TILE\_REGION\_SIZE](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/cd3dx12-tile-region-size)

[核心結構](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [CopyTiles](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copytiles_public.md)
- [CopyTileMappings](/zh-TW/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_copytilemappings_public.md)
- [D3D12_TILE_SHAPE](/zh-TW/reference/graphics/d3d12/structs/d3d12_tile_shape_public.md)
- [D3D12_TILE_RANGE_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_tile_range_flags_public.md)
- [D3D12_TILE_COPY_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_tile_copy_flags_public.md)
