Skip to content

LiteFX::Rendering::Backends::DirectX12BottomLevelAccelerationStructure::build

Performs a complete build of the acceleration structure.

Synopses

Declared in <litefx/backends/dx12.hpp>

Performs a complete build of the acceleration structure.

[[dllimport, dllexport]] void build(
    DirectX12CommandBuffer const& commandBuffer,
    SharedPtr<IDirectX12Buffer const> const& scratchBuffer = nullptr,
    SharedPtr<IDirectX12Buffer const> const& buffer = nullptr,
    UInt64 offset = 0,
    UInt64 maxSize = 0);

» more...

Performs a complete build of the acceleration structure.

[[dllimport, dllexport]] void build(
    ICommandBuffer const& commandBuffer,
    SharedPtr<IBuffer const> const& scratchBuffer = nullptr,
    SharedPtr<IBuffer const> const& buffer = nullptr,
    UInt64 offset = 0,
    UInt64 maxSize = 0);

» more...

Exceptions

NameThrown on
InvalidArgumentExceptionThrown, if scratchBuffer is not nullptr and does not contain enough scratch memory to build the acceleration structure.
ArgumentOutOfRangeExceptionThrown, if buffer is not nullptr and the range provided by offset and maxSize is not fully contained by the buffer.

Parameters

NameDescription
commandBufferThe command buffer used to record the acceleration structure build commands.
scratchBufferThe scratch buffer used during the acceleration structure build, or nullptr if a temporary buffer should be created.
bufferThe buffer that stores the acceleration structure after building, or nullptr if a new buffer should be created.
offsetThe offset into buffer at which the acceleration structure should be stored. Must be a multiple of 256. Ignored if buffer is nullptr.
maxSizeThe maximum available size within buffer at offset. Ignored if buffer is nullptr.

See Also

update