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

# ReadGDSX (XBOX One 系列)

> 從 GDS 讀取資料。

從全域資料共用 (GDS) 讀取資料。

## 語法

```cpp theme={null}
void ReadGDSX(  
         UINT OffsetDwords,  
         UINT NumDwords,  
         D3D12_GPU_VIRTUAL_ADDRESS pValues,  
         D3D12XBOX_GDS_OPERATION Flags  
)  
```

### 參數

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

距離 GDS 中位址 0 的位移 (以 DWORD 為單位)。

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

著色器可使用的 GDS 最大數量 (以 DWORD 為單位)。

*pValues*   \_Inout\_\
類型：[D3D12\_GPU\_VIRTUAL\_ADDRESS](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12_gpu_virtual_address)

GDS 資料的目的地指標。遊戲必須追蹤此指標的存留期，並確保在 GPU 將 GDS 內容寫入其中時，該指標已對應至 GPU 記憶體。

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

複製選項，為 **D3D12XBOX\_GDS\_OPERATION**(d3d12xbox\_gds\_operation.md) 列舉常數的位元 OR 組合。

### 傳回值

類型：void

## 需求

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

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

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

## 另請參閱

[ID3D12GraphicsCommandList](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/id3d12graphicscommandlist)\
[WriteGDSX](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_writegdsx)


## Related topics

- [ReadFromSubresource](/zh-TW/reference/graphics/d3d12/interfaces/id3d12resource/methods/id3d12resource_readfromsubresource_public.md)
- [SHAPE_DMA_READ_WRITE_FULL](/zh-TW/reference/audio/shapedmacontext/structs/shape_dma_read_write_full.md)
- [SetShapePcmReadPointer](/zh-TW/reference/audio/shapepcmcontext/functions/setshapepcmreadpointer.md)
- [GetShapeDmaReadPointer](/zh-TW/reference/audio/shapedmacontext/functions/getshapedmareadpointer.md)
- [IncrementShapeDmaReadPointer](/zh-TW/reference/audio/shapedmacontext/functions/incrementshapedmareadpointer.md)
