Allocation failures: GPU memory requests retry, then drop -- never crash #697

Closed
opened 2026-10-12 06:11:42 +00:00 by sky_line · 1 comment
Owner

Policy (owner, 2026-10-12): a failed allocation is never a crash. Default: keep what we have, retry the request a few frames later (space may free up), then drop that asset/request and log the failure (rate-limited, with what failed, size, and the current RAM/VRAM pressure state). Better a missing texture/mesh than a dead viewer -- and when someone says "things aren't loading", the log tells us it's memory pressure.

Scope (Vulkan / video memory)

  • RT: wrap acceleration-structure builds and TLAS/aux buffers in a soft-allocation scope so the existing fallbacks (skip build, TLAS fallback, abort frame) actually run.
  • Upload staging (stageFor) soft by default; large temporary host-visible buffers get a pre-flight too.
  • Growth paths keep their old capacity on failure and retry later: instance tables (ensureCap last resort), occlusion scratch, particle tables, rig cache, alpha-sort keys.
  • Render targets rebuilt by the VRAM ladder (scale targets, mirrors, probes, temporal) fail softly: keep the previous targets or drop the feature, then step the ladder.
  • Out-of-memory from command-buffer end, queue submit, image-view and descriptor allocation: drop the frame, step the ladder, log -- not fatal.
  • The soft-allocation flag is thread-safe and restored (not reset) after scoped use.
  • Verify with the fault-injection switches (SLVkInjectAllocFail, hard mode) on a teleport loop until no fatal site remains.
**Policy (owner, 2026-10-12):** a failed allocation is never a crash. Default: keep what we have, retry the request a few frames later (space may free up), then drop that asset/request and log the failure (rate-limited, with what failed, size, and the current RAM/VRAM pressure state). Better a missing texture/mesh than a dead viewer -- and when someone says "things aren't loading", the log tells us it's memory pressure. **Scope (Vulkan / video memory)** - RT: wrap acceleration-structure builds and TLAS/aux buffers in a soft-allocation scope so the existing fallbacks (skip build, TLAS fallback, abort frame) actually run. - Upload staging (`stageFor`) soft by default; large temporary host-visible buffers get a pre-flight too. - Growth paths keep their old capacity on failure and retry later: instance tables (`ensureCap` last resort), occlusion scratch, particle tables, rig cache, alpha-sort keys. - Render targets rebuilt by the VRAM ladder (scale targets, mirrors, probes, temporal) fail softly: keep the previous targets or drop the feature, then step the ladder. - Out-of-memory from command-buffer end, queue submit, image-view and descriptor allocation: drop the frame, step the ladder, log -- not fatal. - The soft-allocation flag is thread-safe and restored (not reset) after scoped use. - Verify with the fault-injection switches (`SLVkInjectAllocFail`, hard mode) on a teleport loop until no fatal site remains.
sky_line added this to the Slipstream project 2026-10-12 06:11:42 +00:00
Author
Owner

Fixed in Slipstream 1.3.0 (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0

If you still see this on 1.3.0, reply here and we'll reopen it.

Fixed in **Slipstream 1.3.0** (stable): https://git.slipstreamviewer.org/sky_line/Slipstream/releases/tag/v1.3.0 If you still see this on 1.3.0, reply here and we'll reopen it.
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#697
No description provided.