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

# XGComputeOptimalDepthStencilTileModes (XBOX One 系列)

> 為指定的深度樣板設定計算正確的並排模式。

為指定的深度樣板設定計算正確的並排模式。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
VOID XGComputeOptimalDepthStencilTileModes(  
         XG_FORMAT Format,
         UINT32 Width,
         UINT32 Height,
         UINT32 DepthOrArraySize,
         UINT32 SampleCount,
         BOOL Compressed,
         BOOL TiledResource,
         BOOL TextureCompatible,
         XG_TILE_MODE *pDepthTileMode,
         XG_TILE_MODE *pStencilTileMode
)  
```

<a id="ID4EG" />

### 參數

*Format*   \_In\_\
類型：[XG\_FORMAT](/zh-TW/reference/graphics/xg__NR/enums/xg_format)

格式，以 [XG\_FORMAT](/zh-TW/reference/graphics/xg__NR/enums/xg_format) 列舉常數表示。

*Width*   \_In\_\
類型：UINT32

寬度

*Height*   \_In\_\
類型：UINT32

高度

*DepthOrArraySize*   \_In\_\
類型：UINT32

深度或陣列大小。

*SampleCount*   \_In\_\
類型：UINT32

要使用的樣本數目。

*Compressed*   \_In\_\
類型：BOOL

未使用此參數；在所有情況下都傳遞 `TRUE`。

*TiledResource*   \_In\_\
類型：BOOL

如果使用此並排模式的深度紋理將搭配 Direct3D 並排資源功能 (也稱為部分常駐紋理) 使用，則為 `TRUE`。如果此參數為 `TRUE`，則不支援樣板。

*TextureCompatible*   \_In\_\
類型：BOOL

如果使用此並排模式的深度紋理將在 XBOX One X 硬體上以壓縮狀態作為紋理進行取樣，則為 `TRUE`。如果此參數為 `TRUE`，則不支援樣板。

*pDepthTileMode*   \_Out\_\
類型：[XG\_TILE\_MODE\*](/zh-TW/reference/graphics/xg__NR/enums/xg_tile_mode)

深度並排模式，以指向 [XG\_TILE\_MODE](/zh-TW/reference/graphics/xg__NR/enums/xg_tile_mode) 列舉常數的指標表示。

*pStencilTileMode*   \_Out\_\
類型：[XG\_TILE\_MODE\*](/zh-TW/reference/graphics/xg__NR/enums/xg_tile_mode)

樣板並排模式，以指向 [XG\_TILE\_MODE](/zh-TW/reference/graphics/xg__NR/enums/xg_tile_mode) 列舉常數的指標表示。

<a id="ID4EG" />

### 傳回值

無。

<a id="requirements" />

## 需求

**標頭：** xg.h

**程式庫：** xg\_x.lib

**支援的平台：** XBOX One 系列

## 另請參閱

[XG 參考](/zh-TW/reference/graphics/xg__NR/xg_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [CreateDepthStencilView](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createdepthstencilview_public.md)
- [D3D12_DEPTH_STENCIL_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc_public.md)
- [D3D12_DEPTH_STENCIL_VALUE](/zh-TW/reference/graphics/d3d12/structs/d3d12_depth_stencil_value_public.md)
- [D3D12_DEPTH_STENCIL_DESC1](/zh-TW/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc1_public.md)
