Octree removal 6: move octree-entry data onto LLDrawable / LLVOCacheEntry, then delete llvieweroctree / LLSpatialGroup #480

Closed
opened 2026-10-06 09:30:24 +00:00 by sky_line · 1 comment
Owner

Part of #474. From the 2026-10-06 audit: the octrees are still built and maintained every frame, but almost nothing reads them. Rendering, culling, world picking, LOD, texture priority and lights all run on our own systems.

Many systems read the per-entry data rather than the tree:

  • getSpatialExtents, getPositionGroup, getBinRadius;
  • mDistanceWRTCamera;
  • the visibility frame stamps (setVisible / sCurVisible).

Readers include the clean renderer (avatar extents), texture streaming (vkTextureStreamVisible), LOD (calcLOD), LLDrawable::updateDistance and the VOCache.

Do: move these fields onto LLDrawable / LLVOCacheEntry. Then delete llvieweroctree.*, LLSpatialGroup / LLSpatialPartition, and lloctree.h usage in newview.

Keep the per-mesh triangle octrees (llvolumeoctree.h, the glTF primitive octree). They are the narrow-phase for picking.

Part of #474. From the 2026-10-06 audit: the octrees are still built and maintained every frame, but almost nothing reads them. Rendering, culling, world picking, LOD, texture priority and lights all run on our own systems. Many systems read the per-entry data rather than the tree: - `getSpatialExtents`, `getPositionGroup`, `getBinRadius`; - `mDistanceWRTCamera`; - the visibility frame stamps (`setVisible` / `sCurVisible`). Readers include the clean renderer (avatar extents), texture streaming (`vkTextureStreamVisible`), LOD (`calcLOD`), `LLDrawable::updateDistance` and the VOCache. **Do:** move these fields onto `LLDrawable` / `LLVOCacheEntry`. Then delete `llvieweroctree.*`, `LLSpatialGroup` / `LLSpatialPartition`, and `lloctree.h` usage in newview. **Keep** the per-mesh triangle octrees (llvolumeoctree.h, the glTF primitive octree). They are the narrow-phase for picking.
sky_line added this to the Slipstream project 2026-10-06 15:04:14 +00:00
Author
Owner

Done: merged in 58c9cfef0d (2026-10-07), shipped in 1.2.0 Beta 6. The viewer octree is replaced by a shared spatial entry (8042249519), octree settings and debug displays removed (116adb9fa5); llspatialpartition is gone from the tree.

Done: merged in 58c9cfef0d (2026-10-07), shipped in 1.2.0 Beta 6. The viewer octree is replaced by a shared spatial entry (8042249519), octree settings and debug displays removed (116adb9fa5); llspatialpartition is gone from the tree.
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#480
No description provided.