Diligent::ITopLevelAS struct

Top-level AS interface.

Defines the methods to manipulate a TLAS object

Base classes

struct IDeviceObject
Base interface for all objects created by the render device Diligent::IRenderDevice.

Derived classes

struct ITopLevelASD3D12
Exposes Direct3D12-specific functionality of a top-level acceleration structure object.
struct ITopLevelASVk
Exposes Vulkan-specific functionality of a Top-level acceleration structure object.

Public functions

auto GetDesc() const -> const TopLevelASDesc& override
Returns the top level AS description used to create the object.
auto GetInstanceDesc(const char* Name) const -> TLASInstanceDesc METHOD() virtual
Returns instance description that can be used in shader binding table.
auto GetBuildInfo() const -> TLASBuildInfo METHOD() virtual
Returns TLAS state after the last build or update operation.
auto GetScratchBufferSizes() const -> ScratchBufferSizes METHOD() virtual
Returns scratch buffer info for the current acceleration structure.
auto GetNativeHandle() -> void*METHOD() virtual
Returns native acceleration structure handle specific to the underlying graphics API.
auto SetState(RESOURCE_STATE State) -> void METHOD() virtual
Sets the acceleration structure usage state.
auto GetState() const -> RESOURCE_STATE METHOD() virtual
Returns the internal acceleration structure state.

Function documentation

TLASInstanceDesc METHOD() Diligent::ITopLevelAS::GetInstanceDesc(const char* Name) const virtual

Returns instance description that can be used in shader binding table.

Parameters
Name in - Instance name that is specified in TLASBuildInstanceData::InstanceName.
Returns TLASInstanceDesc object, see Diligent::TLASInstanceDesc. If instance does not exist then TLASInstanceDesc::ContributionToHitGroupIndex and TLASInstanceDesc::InstanceIndex are set to INVALID_INDEX.

TLASBuildInfo METHOD() Diligent::ITopLevelAS::GetBuildInfo() const virtual

Returns TLAS state after the last build or update operation.

Returns TLASBuildInfo object, see Diligent::TLASBuildInfo.

ScratchBufferSizes METHOD() Diligent::ITopLevelAS::GetScratchBufferSizes() const virtual

Returns scratch buffer info for the current acceleration structure.

Returns ScratchBufferSizes object, see Diligent::ScratchBufferSizes.

void*METHOD() Diligent::ITopLevelAS::GetNativeHandle() virtual

Returns native acceleration structure handle specific to the underlying graphics API.

Returns pointer to ID3D12Resource interface, for D3D12 implementation
VkAccelerationStructure handle, for Vulkan implementation

void METHOD() Diligent::ITopLevelAS::SetState(RESOURCE_STATE State) virtual

Sets the acceleration structure usage state.