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

# XGComputeOptimalSwizzleMode (XBOX Series 主機)

> 計算指定紋理設定的頻寬最佳 Swizzle 模式。

計算指定紋理設定的頻寬最佳 Swizzle 模式。

此 API 已被取代；請改用 [XGSuggestSwizzleMode](/zh-TW/reference/graphics/xg_xs/functions/xgsuggestswizzlemode)。

## 語法

```cpp theme={null}
XG_SWIZZLE_MODE XGComputeOptimalSwizzleMode(  
         XG_RESOURCE_DIMENSION ResourceDimension,  
         XG_FORMAT Format,  
         UINT32 Width,  
         UINT32 Height,  
         UINT32 DepthOrArraySize,  
         UINT32 SampleCount,  
         UINT BindFlags,  
         UINT MiscFlags= 0  
)  
```

### 參數

*ResourceDimension*   \_In\_\
類型：[XG\_RESOURCE\_DIMENSION](/zh-TW/reference/graphics/xg__NR/enums/xg_resource_dimension)

資源的維度，例如 XG\_RESOURCE\_DIMENSION\_TEXTURE2D。

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

資源資料格式。

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

紋理的寬度 (以像素為單位)。

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

紋理的高度 (以像素為單位)。

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

深度或陣列大小。

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

取樣數。

*BindFlags*   \_In\_\
類型：UINT

指出緩衝區如何繫結至管線的旗標。[XG\_BIND\_FLAG](/zh-TW/reference/graphics/xg__NR/enums/xg_bind_flag) 列舉常數的邏輯 OR 組合。

*MiscFlags*   \_In\_\
類型：UINT

用來控制此作業的其他旗標。[XG\_RESOURCE\_MISC\_FLAG](/zh-TW/reference/graphics/xg__NR/enums/xg_resource_misc_flag) 列舉常數的位元 OR 組合；如果未使用則為 0。

### 傳回值

類型：XG\_SWIZZLE\_MODE

頻寬最佳的 Swizzle 模式。

## 需求

**標頭：** 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-CA/nda/nda-topic-directory.md)
- [Directorio de temas NDA: enlaces activos a Microsoft Learn](/es/nda/nda-topic-directory.md)
- [NDA 主题目录 - Microsoft Learn 在线链接](/zh-CN/nda/nda-topic-directory.md)
