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

# SetHiStencilStateX (XBOX One 系列)

> 設定將在指定資源上持續存在的階層式樣板比較狀態。

設定在指定資源上持續存在的階層式樣板比較狀態。

## 語法

```cpp theme={null}
void SetHiStencilStateX(  
         ID3D12Resource* pResource,  
         const D3D12XBOX_HISTENCIL_CONTROL* pControl  
)  
```

### 參數

*pResource*   \_In\_\
類型：[ID3D12Resource](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12resource/id3d12resource)\*

資源，以指向 **ID3D12Resource** 的指標表示。

*pControl*   \_In\_opt\_\
類型：[D3D12XBOX\_HISTENCIL\_CONTROL\*](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_histencil_control)

指向 **D3D12XBOX\_HISTENCIL\_CONTROL** 樣板狀態控制結構的指標。

### 傳回值

類型：void

## 備註

**SetHiStencilStateX** 是圖形命令清單的 XBOX One 擴充功能。**SetHiStencilStateX** 會設定在指定資源上持續存在的階層式樣板比較狀態。相對地，[SetHiStencilControlX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_sethistencilcontrolx) 提供直接但暫時的覆寫，直到下一個深度/樣板資源繫結至管線為止。

## 需求

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

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

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

## 另請參閱

[ID3D12GraphicsCommandList](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/id3d12graphicscommandlist)


## Related topics

- [OMSetStencilRef](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_omsetstencilref_public.md)
- [CreateDepthStencilView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createdepthstencilview_public.md)
- [D3D12_DEPTH_STENCIL_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc_public.md)
- [D3D12_DEPTH_STENCIL_VALUE](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_value_public.md)
- [D3D12_DEPTH_STENCIL_DESC1](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc1_public.md)
