Skip to content

LiteFX::Rendering::Backends::VulkanCommandBuffer::copyAccelerationStructure

Copies the acceleration structure from into the acceleration structure to.

Synopsis

Declared in <litefx/backends/vulkan.hpp>

[[dllimport, dllexport]] virtual void copyAccelerationStructure(
    VulkanTopLevelAccelerationStructure const& from,
    VulkanTopLevelAccelerationStructure const& to,
    bool compress = false) const noexcept override;

Description

Prefer calling ITopLevelAccelerationStructure::copy over directly issuing copy commands on a command buffer, as this will make sure that the destination buffer will be properly allocated and contains enough memory to store the copy. Only issue copies on the command buffer directly, if you want to retain the destination buffer and know for certain, that it contains a sufficient amount of memory.

This method is only supported if the GraphicsDeviceFeatures::RayTracing feature is enabled.

Parameters

NameDescription
fromThe source acceleration structure to copy from.
toThe destination acceleration structure to copy to.
compressIf set to true, the acceleration structure will be compressed.