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

# D3D12_SO_DECLARATION_ENTRY

> 描述輸出插槽中頂點緩衝區內的頂點元素。

描述輸出插槽中頂點緩衝區內的頂點元素。

## 語法

```cpp theme={null}
typedef struct D3D12_SO_DECLARATION_ENTRY
{
    UINT Stream;
    LPCSTR SemanticName;
    UINT SemanticIndex;
    BYTE StartComponent;
    BYTE ComponentCount;
    BYTE OutputSlot;
} D3D12_SO_DECLARATION_ENTRY
```

### 成員

*Stream*\
類型：UINT

以零為基底的串流編號。

*SemanticName*\
類型：LPCSTR

輸出元素的類型；可能的值包括：**"POSITION"**、**"NORMAL"** 或 **"TEXCOORD0"**。
請注意，如果 **SemanticName** 為 **NULL**，則
**ComponentCount** 可以大於 4，且所描述的項目會是串流輸出中不寫入任何資料的間隙。

*SemanticIndex*\
類型：UINT

輸出元素以零為基底的索引。例如，當每個頂點中儲存了多個紋理座標時使用。

*StartComponent*\
類型：BYTE

開始寫出的項目元件。有效值為 0 到 3。例如，如果您只想輸出到位置的 y 和 z 元件，
則 **StartComponent** 為 1，**ComponentCount** 為 2。

*ComponentCount*\
類型：BYTE

要寫出的項目元件數目。有效值為 1 到 4。例如，如果您只想輸出到位置的 y 和 z 元件，
則 **StartComponent** 為 1，**ComponentCount** 為 2。請注意，如果 **SemanticName** 為 **NULL**，則
**ComponentCount** 可以大於 4，且所描述的項目會是串流輸出中不寫入任何資料的間隙。

*OutputSlot*\
類型：BYTE

繫結至管線的相關聯串流輸出緩衝區。
**OutputSlot** 的有效範圍為 0 到 3。

## 備註

在 [D3D12\_STREAM\_OUTPUT\_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_stream_output_desc_public) 結構的 **pSODeclaration** 成員中指定 **D3D12\_SO\_DECLARATION\_ENTRY** 結構的陣列。

## 需求

**標頭:** d3d12\_xs.h 或 d3d12\_x.h\
**程式庫:** d3d12\_xs.lib 或 d3d12\_x.lib\
**支援的平台**: XBOX Series 主機與 XBOX One 系列

## 另請參閱

[核心結構](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [D3D12_STREAM_OUTPUT_DESC](/zh-TW/reference/graphics/d3d12/structs/d3d12_stream_output_desc_public.md)
- [D3D12_QUERY_DATA_SO_STATISTICS](/zh-TW/reference/graphics/d3d12/structs/d3d12_query_data_so_statistics_public.md)
- [D3D12_GRAPHICS_STATES](/zh-TW/reference/graphics/d3d12/enums/d3d12_graphics_states_public.md)
- [D3D12_FORMAT_SUPPORT1](/zh-TW/reference/graphics/d3d12/enums/d3d12_format_support1_public.md)
- [D3D12_FEATURE](/zh-TW/reference/graphics/d3d12/enums/d3d12_feature_public.md)
