ID3D12GraphicsCommandList4::CopyRaytracingAccelerationStructure method (d3d12.h)

Copies a source acceleration structure to destination memory while applying the specified transformation.

Syntax

void CopyRaytracingAccelerationStructure(
  [in] D3D12_GPU_VIRTUAL_ADDRESS                         DestAccelerationStructureData,
  [in] D3D12_GPU_VIRTUAL_ADDRESS                         SourceAccelerationStructureData,
  [in] D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode
);

Parameters

[in] DestAccelerationStructureData

The destination memory. The required size can be discovered by calling EmitRaytracingAccelerationStructurePostbuildInfo beforehand, if necessary for the specified Mode.

The destination start address must be aligned to 256 bytes, defined as D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT, regardless of the specified Mode.

The destination memory range cannot overlap source. Otherwise, results are undefined.

The resource state that the memory pointed to must be in depends on the Mode parameter. For more information, see D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE.

[in] SourceAccelerationStructureData

The address of the acceleration structure or other type of data to copy/transform based on the specified Mode. The data remains unchanged and usable. The operation only copies the data pointed to by SourceAccelerationStructureData and not any other data, such as acceleration structures, that the source data may point to. For example, in the case of a top-level acceleration structure, any bottom-level acceleration structures that it points to are not copied in the operation.

The source memory must be aligned to 256 bytes, defined as D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT, regardless of the specified Mode.

The resource state that the memory pointed to must be in depends on the Mode parameter. For more information, see D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE.

[in] Mode

The type of copy operation to perform. For more information, see D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE.

Return value

None

Remarks

Since raytracing acceleration structures may contain internal pointers and have a device dependent opaque layout, copying them around or otherwise manipulating them requires a dedicated API so that drivers can handle the requested operation.

This method can be called from graphics or compute command lists but not from bundles.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll

See also

ID3D12GraphicsCommandList4