Explore RTX Mega Geometry: partitioned TLAS (PTLAS) and cluster BLAS (CLAS), measure first #296

Closed
opened 2026-10-04 13:06:27 +00:00 by sky_line · 1 comment
Owner

Explore NVIDIA RTX Mega Geometry for our ray tracing:

  • PTLAS: partitioned TLAS, VK_NV_partitioned_acceleration_structure.
  • Cluster BLAS (CLAS): VK_NV_cluster_acceleration_structure.

Both are NVIDIA-only today, so any adoption keeps the current path as the permanent fallback for AMD/Intel/other drivers, behind a setting and a capability check.

Current state (busy sim, 1920x1044, from VKMem / RT logs)

  • TLAS: about 92k active instances (cap 262k). Refit (BUILD_MODE_UPDATE) most frames, full rebuild every N (RenderVKTLASRefit + interval). Aux: TLAS 96 MB, scratch 124 MB, instances 30 MB.
  • BLAS: about 37k static BLAS, one per mesh LOD slot, shared by instances, compacted (~929 MB total incl. rigged ~177 MB and terrain-morph ~38 MB).

1. Measure first (do this before any implementation)

  • Add GPU timers for TLAS refit, TLAS rebuild and BLAS builds/compactions per frame (RenderVKGpuTimers sub-marks).
  • Add frame-pacing correlation for the periodic rebuild: are there visible spikes?
  • Capture in a busy sim (Baltimare, a crowded club) on NVIDIA and AMD.

2. PTLAS

  • Partitions: static world instances by region / spatial cell (they rarely change); one or more dynamic partitions (moving objects, physical, animesh); avatars/attachments. Only partitions with changes rebuild each frame. No refit quality decay, no periodic full-rebuild spike.
  • Fit with our pipeline: the GPU-driven instance store already knows dirtiness per instance. Partition assignment can be a GPU-side write.
  • Expected win: GPU time per frame (the refit touches all ~92k instances today) and smoother pacing. Not memory.
  • Go/no-go: pursue if refit + amortised rebuild is above ~0.5 ms or rebuild spikes are visible.

3. Cluster BLAS (CLAS)

  • How: build BLAS from small clusters (reusable templates instantiated per mesh), as Mega Geometry intends for dense geometry.
  • Expected win: BLAS memory and build time, which matters for the VRAM epic (#282). The 929 MB of BLAS is the largest RT allocation, and template reuse plus faster builds could also remove BLAS build hitches on load-in.
  • Questions:
    • How do our per-LOD-slot BLAS map to clusters? (Mesh LODs are already packed into slots; clusters may need a meshlet build at ingest, which overlaps a future visibility-buffer / meshlet pipeline.)
    • Rigged meshes: cluster refit vs our per-frame rigged builds.
    • Opacity micromaps (OMM) interaction.
    • Driver maturity on Linux.
  • Go/no-go: a prototype on a few heavy assets showing memory and build-time numbers against the current compacted BLAS.

Done when

Measurements are recorded, each extension has a go/no-go decision with numbers, and any "go" has its own implementation ticket with the fallback design.

Explore NVIDIA RTX Mega Geometry for our ray tracing: - **PTLAS:** partitioned TLAS, `VK_NV_partitioned_acceleration_structure`. - **Cluster BLAS (CLAS):** `VK_NV_cluster_acceleration_structure`. Both are NVIDIA-only today, so any adoption keeps the current path as the permanent fallback for AMD/Intel/other drivers, behind a setting and a capability check. ### Current state (busy sim, 1920x1044, from VKMem / RT logs) - **TLAS:** about 92k active instances (cap 262k). Refit (`BUILD_MODE_UPDATE`) most frames, full rebuild every N (`RenderVKTLASRefit` + interval). Aux: TLAS 96 MB, scratch 124 MB, instances 30 MB. - **BLAS:** about 37k static BLAS, one per mesh LOD slot, shared by instances, compacted (~929 MB total incl. rigged ~177 MB and terrain-morph ~38 MB). ### 1. Measure first (do this before any implementation) - Add GPU timers for TLAS refit, TLAS rebuild and BLAS builds/compactions per frame (`RenderVKGpuTimers` sub-marks). - Add frame-pacing correlation for the periodic rebuild: are there visible spikes? - Capture in a busy sim (Baltimare, a crowded club) on NVIDIA and AMD. ### 2. PTLAS - **Partitions:** static world instances by region / spatial cell (they rarely change); one or more dynamic partitions (moving objects, physical, animesh); avatars/attachments. Only partitions with changes rebuild each frame. No refit quality decay, no periodic full-rebuild spike. - **Fit with our pipeline:** the GPU-driven instance store already knows dirtiness per instance. Partition assignment can be a GPU-side write. - **Expected win:** GPU time per frame (the refit touches all ~92k instances today) and smoother pacing. **Not** memory. - **Go/no-go:** pursue if refit + amortised rebuild is above ~0.5 ms or rebuild spikes are visible. ### 3. Cluster BLAS (CLAS) - **How:** build BLAS from small clusters (reusable templates instantiated per mesh), as Mega Geometry intends for dense geometry. - **Expected win:** BLAS memory and build time, which matters for the VRAM epic (#282). The 929 MB of BLAS is the largest RT allocation, and template reuse plus faster builds could also remove BLAS build hitches on load-in. - **Questions:** - How do our per-LOD-slot BLAS map to clusters? (Mesh LODs are already packed into slots; clusters may need a meshlet build at ingest, which overlaps a future visibility-buffer / meshlet pipeline.) - Rigged meshes: cluster refit vs our per-frame rigged builds. - Opacity micromaps (OMM) interaction. - Driver maturity on Linux. - **Go/no-go:** a prototype on a few heavy assets showing memory and build-time numbers against the current compacted BLAS. ### Done when Measurements are recorded, each extension has a go/no-go decision with numbers, and any "go" has its own implementation ticket with the fallback design.
sky_line added this to the Slipstream project 2026-10-06 15:04:13 +00:00
Author
Owner

Superseded by #581 (NVIDIA cluster / compressed acceleration structures), which carries the current VRAM context.

Superseded by #581 (NVIDIA cluster / compressed acceleration structures), which carries the current VRAM context.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#296
No description provided.