LL perf (Objects/world): Camera movement makes VK re-ingest terrain patches #324

Closed
opened 2026-10-04 14:09:20 +00:00 by sky_line · 0 comments
Owner

From the LL-origin inefficiency audit (finding O19). File/line references are from commit 0229f8872c; re-locate them before working.

Camera movement makes VK re-ingest terrain patches

  • What happens: LLSurfacePatch::updateVisibility computes the GL stride and calls dirtyGeom() on the patch plus its W/S neighbours when the stride band changes (llsurfacepatch.cpp:999-1062, called every frame from llsurface.cpp:568).
  • Under VK: dirtyGeom triggers noteTerrainDirty plus markRebuild plus movePartition (llvosurfacepatch.cpp:163). The VK terrain mesh does not depend on stride, so this is CPU regeneration only for captureTerrain to de-dup it.
  • Fix: skip the stride/dirtyGeom logic under VK.
  • Confirmed path, cost not measured. S, low risk. (This sits in LL code but has a VK-specific consequence.)

Verify the cost (profile or timer) before and after changing it.

From the LL-origin inefficiency audit (finding O19). File/line references are from commit 0229f8872c; re-locate them before working. **Camera movement makes VK re-ingest terrain patches** - **What happens:** `LLSurfacePatch::updateVisibility` computes the GL stride and calls `dirtyGeom()` on the patch plus its W/S neighbours when the stride band changes (`llsurfacepatch.cpp:999-1062`, called every frame from `llsurface.cpp:568`). - **Under VK:** `dirtyGeom` triggers `noteTerrainDirty` plus `markRebuild` plus `movePartition` (`llvosurfacepatch.cpp:163`). The VK terrain mesh does not depend on stride, so this is CPU regeneration only for `captureTerrain` to de-dup it. - **Fix:** skip the stride/`dirtyGeom` logic under VK. - Confirmed path, cost not measured. S, low risk. (This sits in LL code but has a VK-specific consequence.) Verify the cost (profile or timer) before and after changing it.
sky_line added this to the Slipstream project 2026-10-06 15:04:14 +00:00
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#324
No description provided.