ID3D12GraphicsCommandList1::AtomicCopyBufferUINT method (d3d12.h)

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

These 'dependent resourses' 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, supports a primary data element of type UINT64 (64bit).

Syntax

void AtomicCopyBufferUINT(
  ID3D12Resource                       *pDstBuffer,
  UINT64                               DstOffset,
  ID3D12Resource                       *pSrcBuffer,
  UINT64                               SrcOffset,
  UINT                                 Dependencies,
  ID3D12Resource                       * const *ppDependentResources,
  const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges
);

Parameters

pDstBuffer

Type: ID3D12Resource*

SAL: In

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

Type: ID3D12Resource*

SAL: In

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

Type: ID3D12Resource*

SAL: In_reads(Dependencies)

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

pDependentSubresourceRanges

Type: const D3D12_SUBRESOURCE_RANGE_UINT64*

SAL: In_reads(Dependencies)

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

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 percieved latency between input and rendering.

Requirements

   
Target Platform Windows
Header d3d12.h
Library D3d12.lib
DLL D3d12.dll

See also

ID3D12GraphicsCommandList1