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

> Atomically copies a primary data element of type UINT from one resource to another, along with optional dependent resources.

Atomically copies a primary data element of type UINT from one resource to another, along with optional dependent resources.

These 'dependent resources' are so-named because they depend upon the primary data element to locate them, typically the key element is an address, index, or other handle that refers to one or more the dependent resources indirectly.

This function supports a primary data element of type UINT (32bit). A different version of this function, [AtomicCopyBufferUINT64](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_atomiccopybufferuint64_public), supports a primary data element of type UINT64 (64bit).

## Syntax

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

### Parameters

*pDstBuffer \[in]*\
Type: 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>

The resource that the UINT primary data element is copied into.

*DstOffset*\
Type: UINT64

An offset into the destination resource buffer that specifies where the primary data element is copied into, in bytes. This offset combined with the base address of the resource buffer must result in a memory address that's naturally aligned for UINT values.

*pSrcBuffer \[in]*\
Type: 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>

The resource that the UINT primary data element is copied from. This data is typically an address, index, or other handle that shader code can use to locate the most-recent version of latency-sensitive information.

*SrcOffset*\
Type: UINT64

An offset into the source resource buffer that specifies where the primary data element is copied from, in bytes. This offset combined with the base address of the resource buffer must result in a memory address that's naturally aligned for UINT values.

*Dependencies*\
Type: UINT

The number of dependent resources.

*ppDependentResources \[in]*\
Type: 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>

An array of resources that contain the dependent elements of the data payload.

*pDependentSubresourceRanges \[in]*\
Type: 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>

An array of subresource ranges that specify the dependent elements of the data payload. These elements are completely updated before the primary data element is itself atomically copied. This ensures that the entire operation is logically atomic; that is, the primary data element never refers to an incomplete data payload.

### Return value

Type: void

None.

## Remarks

This method is typically used to update resources for which normal rendering pipeline latency can be detrimental to user experience. For example, an application can compute a view matrix from the latest user input (such as from the sensors of a head-mounted display), and use this function to update and activate this matrix in command lists already dispatched to the GPU to reduce perceived latency between input and rendering.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

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


## Related topics

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