ID3D12GraphicsCommandList1::AtomicCopyBufferUINT64 method (d3d12.h)
Atomically copies a primary data element of type UINT64 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 UINT64 (64bit). A different version of this function, AtomicCopyBufferUINT, supports a primary data element of type UINT (32bit).
Syntax
void AtomicCopyBufferUINT64(
[in] ID3D12Resource *pDstBuffer,
UINT64 DstOffset,
[in] ID3D12Resource *pSrcBuffer,
UINT64 SrcOffset,
UINT Dependencies,
[in] ID3D12Resource * const *ppDependentResources,
[in] const D3D12_SUBRESOURCE_RANGE_UINT64 *pDependentSubresourceRanges
);
Parameters
[in] pDstBuffer
Type: ID3D12Resource*
SAL: In
The resource that the UINT64 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 UINT64 values.
[in] pSrcBuffer
Type: ID3D12Resource*
SAL: In
The resource that the UINT64 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 UINT64 values.
Dependencies
Type: UINT
The number of dependent resources.
[in] ppDependentResources
Type: ID3D12Resource*
SAL: In_reads(Dependencies)
An array of resources that contain the dependent elements of the data payload.
[in] 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 perceived latency between input and rendering.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d12.h |
Library | D3d12.lib |
DLL | D3d12.dll |