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

# XGValidateDepthStencilTileMode (XBOX One 系列)

> 檢查指定的並排模式對於深度樣板格式和樣本計數是否有效。

檢查指定的並排模式對於深度樣板格式和樣本計數是否有效。

## 語法

```cpp theme={null}
HRESULT XGValidateDepthStencilTileMode(  
         XG_FORMAT Format,  
         UINT32 SampleCount,  
         XG_TILE_MODE TileMode  
)  
```

### 參數

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

要據以檢查並排模式的深度樣板格式。

*SampleCount*   \_In\_<br />類型：UINT32

要據以檢查並排模式的樣本計數。

*TileMode*   \_In\_<br />類型：[XG\_TILE\_MODE](/zh-TW/reference/graphics/xg__NR/enums/xg_tile_mode)

要驗證的並排模式。

### 傳回值

類型：[HRESULT](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

如果指定的並排模式對於深度樣板格式和樣本計數有效，會傳回 **S\_OK**；否則會傳回錯誤碼。如需錯誤碼清單，請參閱[錯誤碼](/zh-TW/reference/errorcodes)。可能的錯誤碼值包括下列各項。

| 傳回碼 | 描述 |
| - | - |
| **E\_FAIL** | 指定的並排模式對於指定的深度樣板格式和樣本計數無效。 |
| **E\_INVALIDARG** | 深度樣板格式未設定為有效的深度格式，或指定的並排模式在任何情況下都不適合作為深度緩衝區使用。 |

<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)
