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

# AtomicCopyBufferUINT

> 以不可部分完成的方式，將 UINT 類型的主要資料元素連同選用的相依資源，從一個資源複製到另一個資源。

以不可部分完成的方式，將 UINT 類型的主要資料元素連同選用的相依資源，從一個資源複製到另一個資源。

這些「相依資源」之所以如此命名，是因為它們依賴主要資料元素來找到它們；通常關鍵元素是位址、索引或其他間接參考一或多個相依資源的控制代碼。

此函式支援 UINT (32 位元) 類型的主要資料元素。此函式的另一個版本 [AtomicCopyBufferUINT64](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_atomiccopybufferuint64_public) 則支援 UINT64 (64 位元) 類型的主要資料元素。

## 語法

```cpp theme={null}
void AtomicCopyBufferUINT(
    ID3D12Resource  pDstBuffer,
    UINT64 DstOffset,
    ID3D12Resource  pSrcBuffer,
    UINT64 SrcOffset,
    UINT Dependencies,
    ID3D12Resource const  ppDependentResources,
    const D3D12_SUBRESOURCE_RANGE_UINT64  pDependentSubresourceRanges
)
```

### 參數

*pDstBuffer \[in]*\
類型：ID3D12Resource \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values?view=vs-2015\&preserve-view=true): <code>*In*</code>

UINT 主要資料元素要複製到的資源。

*DstOffset*\
類型：UINT64

目的地資源緩衝區中的位移 (以位元組為單位)，指定主要資料元素要複製到的位置。此位移與資源緩衝區的基底位址結合後，必須產生針對 UINT 值自然對齊的記憶體位址。

*pSrcBuffer \[in]*\
類型：ID3D12Resource \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values?view=vs-2015\&preserve-view=true): <code>*In*</code>

UINT 主要資料元素的複製來源資源。此資料通常是位址、索引或其他控制代碼，著色器程式碼可用來找到對延遲敏感之資訊的最新版本。

*SrcOffset*\
類型：UINT64

來源資源緩衝區中的位移 (以位元組為單位)，指定主要資料元素的複製來源位置。此位移與資源緩衝區的基底位址結合後，必須產生針對 UINT 值自然對齊的記憶體位址。

*Dependencies*\
類型：UINT

相依資源的數目。

*ppDependentResources \[in]*\
類型：ID3D12Resource \*const \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values?view=vs-2015\&preserve-view=true): <code>*In\_reads*(Dependencies)</code>

包含資料承載之相依元素的資源陣列。

*pDependentSubresourceRanges \[in]*\
類型：const D3D12\_SUBRESOURCE\_RANGE\_UINT64 \*

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values?view=vs-2015\&preserve-view=true): <code>*In\_reads*(Dependencies)</code>

指定資料承載之相依元素的子資源範圍陣列。這些元素會在主要資料元素本身以不可部分完成的方式複製之前完全更新。這可確保整個作業在邏輯上是不可部分完成的；也就是說，主要資料元素永遠不會參考不完整的資料承載。

### 傳回值

類型：void

無。

## 備註

此方法通常用於更新一般轉譯管線延遲可能會損害使用者體驗的資源。例如，應用程式可以根據最新的使用者輸入 (例如來自頭戴式顯示器的感應器) 計算檢視矩陣，並使用此函式在已分派至 GPU 的命令清單中更新並啟用此矩陣，以減少輸入與轉譯之間可感知的延遲。

## 需求

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

## 另請參閱

[ID3D12GraphicsCommandList1](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/id3d12graphicscommandlist1_public)


## Related topics

- [AtomicCopyBufferUINT64](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_atomiccopybufferuint64_public.md)
- [D3D12_SUBRESOURCE_RANGE_UINT64](/zh-TW/reference/graphics/d3d12/structs/d3d12_subresource_range_uint64_public.md)
- [CopyBufferRegion](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copybufferregion_public.md)
- [CopyTiles](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copytiles_public.md)
- [D3D12_TILE_COPY_FLAGS](/zh-TW/reference/graphics/d3d12/enums/d3d12_tile_copy_flags_public.md)
