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

# XGValidateDepthStencilSwizzleMode (XBOX Series 主機)

> 檢查指定的 Swizzle 模式對深度樣板格式和取樣數是否有效。

檢查指定的 Swizzle 模式對深度樣板格式和取樣數是否有效。

## 語法

```cpp theme={null}
HRESULT XGValidateDepthStencilSwizzleMode(  
         XG_FORMAT Format,  
         UINT32 SampleCount,  
         XG_SWIZZLE_MODE SwizzleMode  
)  
```

### 參數

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

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

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

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

*SwizzleMode*   \_In\_\
類型：[XG\_SWIZZLE\_MODE](/zh-TW/reference/graphics/xg_xs/enums/xg_swizzle_mode)

要驗證的 Swizzle 模式。

### 傳回值

類型：HRESULT

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

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

## 需求

**標頭：** xg\_xs.h

**程式庫：** xg\_xs.lib\
**支援的平台**：XBOX Series 主機

## 另請參閱

[xg\_xs](/zh-TW/reference/graphics/xg_xs/xg_xs_members)


## Related topics

- [DSTORAGE_SWIZZLE_MODE](/reference/system/dstorage/enums/dstorage_swizzle_mode.md)
- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr/nda/nda-topic-directory.md)
- [CreateDepthStencilView](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createdepthstencilview_public.md)
