Crash at packed venues: rigged buffers sized to an all-instances upper bound (50M verts) -> driver segfault allocating TAA skin history; size from visible demand #559

Closed
opened 2026-10-08 16:25:50 +00:00 by sky_line · 0 comments
Owner

Crash (2026-10-08, owner's machine, PEAK Lounge, 4096 m draw distance, right after a teleport into a packed venue): SIGSEGV inside the NVIDIA driver from VkDeviceContext::createBuffer ← LLCleanRendererVK::ensureTemporal (llcleanrenderervk.cpp ~14824), allocating skinHistPositions at 1,783,795,920 bytes. That is mSkinVertCap = 74.3M skinned vertices × 24 B.

Why: the rigged demand scan (llcleanrenderervk.cpp ~7212–7290) sizes buffers to an upper bound: every live rigged instance in range, at its finest resident LOD, on screen or not. In about 60 s after the teleport it climbed to 12,746 skins, 63,871 rigged items and 49.5M vertices. The only limit was rigBufferBudgetBytes() = 1/4 of device-local VRAM per buffer (8 GB on a 32 GB card). Several buffers scale with it: the skinned verts themselves, plus the TAA mirrors prevSkinnedPositions (16 B/vert) and skinHistPositions (24 B/vert). Together they ran into gigabytes, and the driver crashed instead of returning OOM.

Shipped mitigation (00f2e6a71e on vulkan-port-tb):

  • New setting RenderVKMaxSkinnedVerts (default 8M, minimum 1M) caps the demand.
  • Past it, the cull's existing R_RIGCAP path drops what doesn't fit.

Proper fix (GPU-driven):

  • Size the rigged buffers from the visible demand the cull actually produced (readback: items/verts written + R_RIGCAP drops), grow on drops with headroom, and shrink with hysteresis, instead of from the CPU-side upper bound over every rigged instance in range.
  • Budget all rigged buffers together (and their TAA history copies), not each at 1/4 of VRAM.
  • Treat a driver-side allocation failure as soft wherever possible.

Done when: a packed venue at max draw distance can't drive rigged memory past a combined budget, and nothing visible on screen is dropped in ordinary crowds.

**Crash (2026-10-08, owner's machine, PEAK Lounge, 4096 m draw distance, right after a teleport into a packed venue):** SIGSEGV inside the NVIDIA driver from `VkDeviceContext::createBuffer` ← `LLCleanRendererVK::ensureTemporal` (llcleanrenderervk.cpp ~14824), allocating `skinHistPositions` at **1,783,795,920 bytes**. That is `mSkinVertCap` = 74.3M skinned vertices × 24 B. **Why:** the rigged demand scan (`llcleanrenderervk.cpp` ~7212–7290) sizes buffers to an **upper bound**: every live rigged instance in range, at its finest resident LOD, on screen or not. In about 60 s after the teleport it climbed to 12,746 skins, 63,871 rigged items and 49.5M vertices. The only limit was `rigBufferBudgetBytes()` = 1/4 of device-local VRAM **per buffer** (8 GB on a 32 GB card). Several buffers scale with it: the skinned verts themselves, plus the TAA mirrors `prevSkinnedPositions` (16 B/vert) and `skinHistPositions` (24 B/vert). Together they ran into gigabytes, and the driver crashed instead of returning OOM. **Shipped mitigation (00f2e6a71e on vulkan-port-tb):** - New setting `RenderVKMaxSkinnedVerts` (default 8M, minimum 1M) caps the demand. - Past it, the cull's existing R_RIGCAP path drops what doesn't fit. **Proper fix (GPU-driven):** - Size the rigged buffers from the **visible** demand the cull actually produced (readback: items/verts written + R_RIGCAP drops), grow on drops with headroom, and shrink with hysteresis, instead of from the CPU-side upper bound over every rigged instance in range. - Budget all rigged buffers **together** (and their TAA history copies), not each at 1/4 of VRAM. - Treat a driver-side allocation failure as soft wherever possible. **Done when:** a packed venue at max draw distance can't drive rigged memory past a combined budget, and nothing visible on screen is dropped in ordinary crowds.
sky_line added this to the Slipstream project 2026-10-08 16:25:50 +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#559
No description provided.