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

# PIXSetRetailMarker

> PIXSetRetailMarker

# PIXSetRetailMarker

當特定使用者定義的事件發生時，插入零售標記。

## 語法

```cpp theme={null}
void PIXSetRetailMarker(  
         void* context,  
         UINT64 color,  
         PCWSTR formatString,  
         ...  
)  
```

### 參數

*context*   \
類型：void\*

事件的內容，接受 **ID3D12GraphicsCommandList\*** 、**ID3D12CommandQueue\*** 和 **ID3D12XboxDmaCommandList\*** (僅限 XBOX)。

*color*   \
類型：UINT64

此事件在 PIX 視窗中發生時，計時圖表中將使用的色彩。\
使用 [PIX\_COLOR](/zh-TW/reference/tools/pix3/functions/pix_color) 指定色彩、使用 [PIX\_COLOR\_INDEX](/zh-TW/reference/tools/pix3/functions/pix_color_index) 指定色彩索引，或傳入原始 DWORD (請注意格式為 ARGB，且 Alpha 色板值必須為 0xff)。

*formatString*   \_In\_\
類型：PCWSTR

用來描述事件的名稱，為以 Null 結束之 Unicode 字串的指標。此字串可以指定零個或多個選擇性的字串格式預留位置，與 **sprintf** 格式非常類似。

類型：...

如果在 **formatString** 中使用了預留位置，則必須有對應數目的參數 (最多 16 個)，且其類型必須與預留位置相符。

### 傳回值

類型：void

## 備註

在偵錯或已檢測的裝置上，`PIXSetRetailMarker` 的行為與 [PIXSetMarker](/zh-TW/reference/tools/pix3/functions/pixsetmarker) 完全相同。在零售裝置上，標記將包含在 HIX 檔案中，以用於 GPU 停止回應偵錯。

對 `PIXSetRetailMarker` 的呼叫可以在任何位置發生，不必在 [PIXBeginRetailEvent](/zh-TW/reference/tools/pix3/functions/pixbeginretailevent) 呼叫之後。

## 需求

**標頭：** pix3.h

**程式庫：** pixevt.lib
**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[PIX 概觀 (NDA 主題)](/zh-TW/tools/tools-console/pix/pix)\
[pix3](/zh-TW/reference/tools/pix3/pix3_members)\
[PIXSetRetailMarker(void\*, UINT64, PCSTR, ...)](/zh-TW/reference/tools/pix3/functions/pixsetretailmarker)\
[PIXBeginRetailEvent](/zh-TW/reference/tools/pix3/functions/pixbeginretailevent)


## Related topics

- [PIXSetRetailMarker 函式](/zh-TW/reference/tools/pix3/functions/pixsetretailmarker.md)
- [PIXSetMarker](/zh-TW/reference/tools/pix3/functions/pixsetmarker-overloads.md)
- [PIXSetMarker 函式](/zh-TW/reference/tools/pix3/functions/pixsetmarker.md)
- [PIXSetMarker 參考](/zh-TW/reference/tools/pix3/functions/pixsetmarker_2.md)
- [PIXSetMarker 概觀](/zh-TW/reference/tools/pix3/functions/pixsetmarker_4.md)
