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

# SetOptionX (XBOX Series 主機)

> 變更著色器設定。

變更著色器設定。

## 語法

```cpp theme={null}
HRESULT SetOptionX(  
         D3D12XBOX_PIPELINE_STATE_OPTION_TYPE type,  
         UINT64 extraFlags,  
         UINT optionSize,  
         const void* pOptionData  
)  
```

### 參數

*type*   \_In\_\
類型：[D3D12XBOX\_PIPELINE\_STATE\_OPTION\_TYPE](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12xbox_pipeline_state_option_type)

要變更的設定

*extraFlags*   \_In\_\
類型：UINT64

必須為 0。

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

選項的大小 (以位元組為單位)

*pOptionData*   \_In\_\
類型：void\*

指向提供選項之緩衝區的指標。應為取決於類型列舉的其中一種資料類型。

### 傳回值

類型：HRESULT

如果成功，則為 S\_OK，否則為錯誤

## 備註

僅針對計算著色器實作。\
XDXR 使用此方法來設定著色器上的 scratch\_en 位元、覆寫 VGPR 數目，以及覆寫 LDS\_SIZE。

## 需求

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

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

## 另請參閱

[ID3D12PipelineState](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12PipelineState/id3d12pipelinestate_xs)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [XBOX Series X|S 總覽](/zh-TW/paths/series-xs/overview.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
- [Play Anywhere(主機 + PC)總覽](/zh-TW/paths/play-anywhere/overview.md)
- [XR-130 XBOX Series X|S 世代](/zh-TW/publishing/certification/xr/xr-130.md)
