Skip to content

Support cluster acceleration structure builds in slang-rhi #498

@dlacewellNV

Description

@dlacewellNV

Shading intrinsics for cluster geometry were added to Slang in shader-slang/slang#7028.
Now we need a way to build cluster acceleration structures (CLASes) in slang-rhi.
This is supported in OptiX 9.0, or with an extension/NVAPI for Vulkan/DX.

OptiX >= 9.0:

optixClusterAccelBuild
optixClusterAccelComputeMemoryUsage

This is an indirect build; it is a host call but some arguments are passed in device memory. There are new OptiX data types to support this.

The pipeline flag OptixPipelineCompileOptions::allowClusteredGeometry must be set to enable clusters during traversal.

Use optixDeviceContextGetProperty with OPTIX_DEVICE_PROPERTY_CLUSTER_ACCEL to check whether the cluster API is supported on a given device.

See the Clusters section of the programming guide for more details:
https://raytracing-docs.nvidia.com/optix9/guide/index.html#acceleration_structures#clusters

NVAPI

NvAPI_D3D12_RaytracingExecuteMultiIndirectClusterOperation
(and many supporting indirect data structures)

Vulkan extension

VK_NV_cluster_acceleration_structure

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions