LiteFX::Rendering::Backends::VulkanTopLevelAccelerationStructure::copy¶
Copies the acceleration structure into the acceleration structure provided by destination.
Synopses¶
Declared in <litefx/backends/vulkan.hpp>
Copies the acceleration structure into the acceleration structure provided by destination.
[[dllimport, dllexport]] void copy(
ICommandBuffer const& commandBuffer,
ITopLevelAccelerationStructure& destination,
bool compress = false,
SharedPtr<IBuffer const> const& buffer = nullptr,
UInt64 offset = 0,
bool copyBuildInfo = true) const;
Copies the acceleration structure into the acceleration structure provided by destination.
[[dllimport, dllexport]] void copy(
VulkanCommandBuffer const& commandBuffer,
VulkanTopLevelAccelerationStructure& destination,
bool compress = false,
SharedPtr<IVulkanBuffer const> const& buffer = nullptr,
UInt64 offset = 0,
bool copyBuildInfo = true) const;
Exceptions¶
| Name | Thrown on |
|---|---|
InvalidArgumentException | Thrown, if compress is set to true, but the current acceleration structure has not been created with the AccelerationStructureFlags::AllowCompaction flag. |
ArgumentOutOfRangeException | Thrown, if buffer is not nullptr and does not fully contain the required memory to store the copy, starting at offset. |
Parameters¶
| Name | Description |
|---|---|
| commandBuffer | The command buffer used to record the acceleration structure copy commands. |
| destination | The acceleration structure to copy the current one into. |
| compress | If true, the acceleration structure data will be compressed. |
| buffer | If 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. |
| offset | The offset at which to store the copy within buffer. Must be a multiple of 256. Ignored if buffer is nullptr. |
| copyBuildInfo | If true, the mesh data or bounding box data is copied into the acceleration structure. |