Skip to content

LiteFX::Rendering::Backends::DirectX12BottomLevelAccelerationStructure::copy

Copies the acceleration structure into the acceleration structure provided by destination.

Synopses

Declared in <litefx/backends/dx12.hpp>

Copies the acceleration structure into the acceleration structure provided by destination.

[[dllimport, dllexport]] void copy(
    DirectX12CommandBuffer const& commandBuffer,
    DirectX12BottomLevelAccelerationStructure& destination,
    bool compress = false,
    SharedPtr<IDirectX12Buffer const> const& buffer = nullptr,
    UInt64 offset = 0,
    bool copyBuildInfo = true) const;

» more...

Copies the acceleration structure into the acceleration structure provided by destination.

[[dllimport, dllexport]] void copy(
    ICommandBuffer const& commandBuffer,
    IBottomLevelAccelerationStructure& destination,
    bool compress = false,
    SharedPtr<IBuffer const> const& buffer = nullptr,
    UInt64 offset = 0,
    bool copyBuildInfo = true) const;

» more...

Exceptions

NameThrown on
InvalidArgumentExceptionThrown, if compress is set to true, but the current acceleration structure has not been created with the AccelerationStructureFlags::AllowCompaction flag.
ArgumentOutOfRangeExceptionThrown, if buffer is not nullptr and does not fully contain the required memory to store the copy, starting at offset.

Parameters

NameDescription
commandBufferThe command buffer used to record the acceleration structure copy commands.
destinationThe acceleration structure to copy the current one into.
compressIf true, the acceleration structure data will be compressed.
bufferIf not nullptr, the destination acceleration structure will be written into the provided buffer. Otherwise a new buffer is allocated, or the existing one is used depending on the available size.
offsetThe offset at which to store the copy within buffer. Must be a multiple of 256. Ignored if buffer is nullptr.
copyBuildInfoIf true, the mesh data or bounding box data is copied into the acceleration structure.