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

# WriteGDSX (XBOX One 系列)

> 將資料寫入全域資料共用 (GDS)。

將資料寫入全域資料共用 (GDS)。

## 語法

```cpp theme={null}
void WriteGDSX(  
         UINT OffsetDwords,  
         UINT NumDwords,  
         const UINT* pValues,  
         D3D12XBOX_GDS_OPERATION Flags  
)  
```

### 參數

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

從 GDS 中位址 0 起算的位移 (以 DWORD 為單位)。

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

用來限制著色器所使用 GDS 數量的 DWORD 數目。

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

GDS 資料的來源資料。如需此資料存留期的相關資訊，請參閱 [D3D12XBOX\_GDS\_OPERATION](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_gds_operation)。

*Flags*   \_In\_\
類型：[D3D12XBOX\_GDS\_OPERATION](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_gds_operation)

以 [D3D12XBOX\_GDS\_OPERATION](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_gds_operation) 列舉常數的位元 OR 組合指定複製選項。

### 傳回值

類型：void

## 備註

Direct3D 12 不會執行任何隱含的 GDS 管理，因此整個 GDS 空間皆可供遊戲使用。遊戲可以視需要分割 GDS。共有 **D3D12XBOX\_GDS\_SIZE\_DWORDS** 個 DWORD 的 GDS 可供遊戲使用。

## 需求

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

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

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

## 另請參閱

[ID3D12GraphicsCommandList](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/id3d12graphicscommandlist)\
[ReadGDSX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_readgdsx)\
[D3D12XBOX\_GDS\_OPERATION](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_gds_operation)


## Related topics

- [WriteBufferImmediate](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist2/methods/id3d12graphicscommandlist2_writebufferimmediate_public.md)
- [XPackageWriteStats](/zh-TW/reference/system/xpackage/structs/xpackagewritestats.md)
- [XGameEventWrite](/zh-TW/reference/system/xgameevent/functions/xgameeventwrite.md)
- [SHAPE_DMA_READ_WRITE_FULL](/zh-TW/reference/audio/shapedmacontext/structs/shape_dma_read_write_full.md)
- [XPackageGetWriteStats](/zh-TW/reference/system/xpackage/functions/xpackagegetwritestats.md)
