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

# D3D12XBOX_DESERIALIZE_SHADER (XBOX One 系列)

> 包含還原序列化先前序列化之著色器的相關資訊，包括 GPU 指令和中繼資料。

包含還原序列化先前序列化之著色器的相關資訊，包括 GPU 指令和中繼資料。

## 語法

```cpp theme={null}
typedef struct D3D12XBOX_DESERIALIZE_SHADER {  
    const void* pGpuInstructions;  
    SIZE_T GpuInstructionsSize;  
    const void* pMetaData;  
    SIZE_T MetaDataSize;  
} D3D12XBOX_DESERIALIZE_SHADER  
```

### 成員

*pGpuInstructions*\
類型: const void\*

指向呼叫 [ID3D12Device::SerializeGraphicsPipelineStateX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12device/methods/id3d12device_serializegraphicspipelinestatex) 所傳回之原始著色器 GPU 指令複本的指標。為了避免 GPU 停止回應，呼叫端必須在管線狀態物件的存留期間保留該記憶體。呼叫端應負責管理 GPU 指令的放置位置和存留期。

由於 Direct3D 12.x 不會複製 GPU 指令，因此 GPU 會直接就地執行著色器。**pGpuInstructions** 必須使用圖形記憶體配置，並對齊 **D3D12XBOX\_GPU\_INSTRUCTIONS\_ALIGNMENT** (256) 個位元組。

*GpuInstructionsSize*\
類型: SIZE\_T

原始著色器 GPU 指令的總大小。

*pMetaData*\
類型: const void\*

指向呼叫 [ID3D12Device::SerializeGraphicsPipelineStateX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12device/methods/id3d12device_serializegraphicspipelinestatex) 所傳回之元件片段的指標。Direct3D 12.x 會複製此資料，讓呼叫端可在呼叫完成後立即覆寫該記憶體。

*MetaDataSize*\
類型: SIZE\_T

中繼資料的大小。

## 備註

此結構包含指向已還原序列化之原始著色器 GPU 指令和已還原序列化之中繼資料的指標。

[D3D12XBOX\_DESERIALIZE\_GRAPHICS\_PIPELINE\_STATE](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_deserialize_graphics_pipeline_state) 和 [D3D12XBOX\_DESERIALIZE\_COMPUTE\_PIPELINE\_STATE](/zh-TW/reference/graphics/d3d12_x/structs/d3d12xbox_deserialize_compute_pipeline_state) 結構會使用此結構。

## 需求

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

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

## 另請參閱

[d3d12\_x](/zh-TW/reference/graphics/d3d12_x/d3d12_x_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [Diretório de tópicos NDA: links ativos do Microsoft Learn](/pt-BR/nda/nda-topic-directory.md)
- [Répertoire des rubriques NDA : liens actifs vers Microsoft Learn](/fr/nda/nda-topic-directory.md)
- [NDA 主题目录 - Microsoft Learn 在线链接](/zh-CN/nda/nda-topic-directory.md)
