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

# CopyRaytracingAccelerationStructure (XBOX Series consoles)

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

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

## Syntax

```cpp theme={null}
void CopyRaytracingAccelerationStructure(
    D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData,
    D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData,
    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode
)
```

### Parameters

*DestAccelerationStructureData \[in]*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS

The destination memory. The required size can be discovered by calling [EmitRaytracingAccelerationStructurePostbuildInfo](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_emitraytracingaccelerationstructurepostbuildinfo_public) beforehand, if necessary for the specified <i>Mode</i>.

The destination start address must be aligned to 256 bytes, defined as [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_BYTE\_ALIGNMENT](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants), regardless of the specified <i>Mode</i>.

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 <i>Mode</i> parameter. For more information, see [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_COPY\_MODE](/reference/graphics/d3d12/enums/d3d12_raytracing_acceleration_structure_copy_mode_public).

*SourceAccelerationStructureData \[in]*\
Type: D3D12\_GPU\_VIRTUAL\_ADDRESS

The address of the acceleration structure or other type of data to copy/transform based on the specified <i>Mode</i>.  The data remains unchanged and usable.  The operation only copies the data  pointed to by <i>SourceAccelerationStructureData</i> 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](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants), regardless of the specified <i>Mode</i>.

The resource state that the memory pointed to must be in depends on the <i>Mode</i> parameter. For more information, see [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_COPY\_MODE](/reference/graphics/d3d12/enums/d3d12_raytracing_acceleration_structure_copy_mode_public).

*Mode \[in]*\
Type: D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_COPY\_MODE

The type of copy operation to perform. For more information, see [D3D12\_RAYTRACING\_ACCELERATION\_STRUCTURE\_COPY\_MODE](/reference/graphics/d3d12/enums/d3d12_raytracing_acceleration_structure_copy_mode_public).

### Return value

Type: void

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

**Header:** d3d12\_xs.h\
**Library:** d3d12\_xs.lib\
**Supported Platforms**: XBOX Series consoles

## See Also

[ID3D12GraphicsCommandList4](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList4/id3d12graphicscommandlist4)


## Related topics

- [BuildRaytracingAccelerationStructure (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_buildraytracingaccelerationstructure_public.md)
- [D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_serialization_desc_public.md)
- [D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_build_raytracing_acceleration_structure_tools_visualization_header_public.md)
- [D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_CURRENT_SIZE_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_current_size_desc_public.md)
- [D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_acceleration_structure_postbuild_info_compacted_size_desc_public.md)
