FX P3: safety — non-fatal user content, device-lost quarantine, safe start, VRAM cap #546

Closed
opened 2026-10-08 06:28:03 +00:00 by sky_line · 1 comment
Owner

Part of epic #542 (from #186). Design + code citations are in the epic; read it first.

Size: M (2-4 d)

Contain broken or hostile effects. Must land before FX is user-visible.

Scope

  • No VK_CHECK on user-content paths: gVkFatalHandler turns failures into LL_ERRS. Shader-module / pipeline / allocation failure disables that effect with a message instead.
  • Robustness: robustBufferAccess2 / robustImageAccess2 on FX pipelines where supported.
  • Caps: texture size, mips, pass count, dispatch size. FX VRAM budget via llvrambudgetvk (refuse to load beyond it; soft pressure disables expensive effects temporarily, per our pressure-degrade rules).
  • Device lost: extend vk_device_lost_handler / gpuLostWriteMarker (llappviewer.cpp:4043, :3823) to record "FX active + last FX breadcrumb". The next launch starts with FX off plus a notice naming the effect, and the effect is quarantined until the user re-enables it.
  • "Provisional" state for newly loaded / edited effects: it clears after N good frames, and a loss while provisional quarantines automatically.
  • Switches: --no-fx launch switch / setting.
  • Double-application detection: one-time warning on detecting injected ReShade (Windows dxgi / opengl32 / d3d proxies next to the exe, VK_LAYER_reshade*) or vkBasalt (ENABLE_VKBASALT).

Done when

  • A deliberately broken effect (bad SPIR-V, huge texture, failing pipeline) never crashes; it is disabled with a readable error.
  • RenderVKDebugSimulateDeviceLost with FX on leads to: next launch FX off, culprit named, quarantine persisted.
  • A real infinite-loop test effect on Linux (amdgpu / nvidia) recovers to the same state after restart; any platform where a hang wedges the desktop is documented.
Part of epic #542 (from #186). Design + code citations are in the epic; read it first. **Size:** M (2-4 d) Contain broken or hostile effects. **Must land before FX is user-visible.** **Scope** - **No `VK_CHECK` on user-content paths:** `gVkFatalHandler` turns failures into LL_ERRS. Shader-module / pipeline / allocation failure disables that effect with a message instead. - **Robustness:** `robustBufferAccess2` / `robustImageAccess2` on FX pipelines where supported. - **Caps:** texture size, mips, pass count, dispatch size. FX VRAM budget via `llvrambudgetvk` (refuse to load beyond it; soft pressure disables expensive effects temporarily, per our pressure-degrade rules). - **Device lost:** extend `vk_device_lost_handler` / `gpuLostWriteMarker` (`llappviewer.cpp:4043`, :3823) to record "FX active + last FX breadcrumb". The next launch starts with **FX off** plus a notice naming the effect, and the effect is quarantined until the user re-enables it. - **"Provisional"** state for newly loaded / edited effects: it clears after N good frames, and a loss while provisional quarantines automatically. - **Switches:** `--no-fx` launch switch / setting. - **Double-application detection:** one-time warning on detecting injected ReShade (Windows dxgi / opengl32 / d3d proxies next to the exe, `VK_LAYER_reshade*`) or vkBasalt (`ENABLE_VKBASALT`). **Done when** - [ ] A deliberately broken effect (bad SPIR-V, huge texture, failing pipeline) never crashes; it is disabled with a readable error. - [ ] `RenderVKDebugSimulateDeviceLost` with FX on leads to: next launch FX off, culprit named, quarantine persisted. - [ ] A real infinite-loop test effect on Linux (amdgpu / nvidia) recovers to the same state after restart; any platform where a hang wedges the desktop is documented.
sky_line added this to the Slipstream project 2026-10-08 06:28:03 +00:00
Author
Owner

Done: FX P3 (safety: device-lost quarantine, provisional effects, --no-fx, VRAM pressure, e0329da854). Shipped in 1.2.0 Beta 4/5 (ReShade effects + cel shading).

Done: FX P3 (safety: device-lost quarantine, provisional effects, --no-fx, VRAM pressure, e0329da854). Shipped in 1.2.0 Beta 4/5 (ReShade effects + cel shading).
sky_line 2026-10-09 09:25:21 +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#546
No description provided.