VRAM: SSR / refraction / water-exclusion set allocated with no consumer -- needs a consumer audit (more readers than SSR) #1663

Open
opened 2026-11-21 19:28:59 +00:00 by sky_line · 0 comments
Owner

What

ensureSSR allocates mPrevColor (RGBA16F), mPrevDepth (D32), mRefract (RGBA16F), mWaterExcl (R8) and mReact with no feature gate: 17 B/px for the first three plus the exclusion mask.

Saving

mPrevColor + mRefract + mWaterExcl: 17 B/px, so 134 MB at 4K and 60 MB at 1440p, when nothing reads them.

Why it is not a quick change

The audit took this set to be read only by SSR and water. The consumer search on 2026-11-21 found more readers:

  • mRefract: the FSR reactive reference (prepareFSR refView, the FSR t.ref input), the RR input set (rrTry) and the DLSS RR overlay colour input (rrOverlayNow: "the colour input is the opaque scene, mRefract was copied this frame"), as well as the water FS.
  • mPrevColor: RCAS sharpening on native frames without a temporal resolve (updateRcasSets, recordRcas), the VRS rate image (ensureVrs: luminance of last frame), snapshots (they swap it in beginOffscreen / endOffscreen), and SSR / water.
  • mPrevDepth: SSR, the per-view reprojection list, and possibly the GI lag-depth question (item 8 of the audit).

A liveness free therefore needs every one of these gated: TAA / FSR / RR on, RCAS amount > 0, VRS on, water in view, SSR on.

Proposed design

  • Per image, a wanted predicate built from its readers, with free on liveness (10 s grace, like mAoNormal / #1432).
  • 1x1 placeholders bound while freed, so set 0 bindings 7 / 8 and the water set stay valid.
  • A missing image counts as no history: SSR and the reactive reference treat it like the first frame after a resize.
  • VKMem logs the set's state.

Risks

  • A reader missed in the audit samples a placeholder (wrong image for a frame, no crash).
  • History restart pops when a reader turns on.
## What `ensureSSR` allocates `mPrevColor` (RGBA16F), `mPrevDepth` (D32), `mRefract` (RGBA16F), `mWaterExcl` (R8) and `mReact` with no feature gate: 17 B/px for the first three plus the exclusion mask. ## Saving `mPrevColor` + `mRefract` + `mWaterExcl`: 17 B/px, so 134 MB at 4K and 60 MB at 1440p, when nothing reads them. ## Why it is not a quick change The audit took this set to be read only by SSR and water. The consumer search on 2026-11-21 found more readers: * `mRefract`: the FSR reactive reference (`prepareFSR` refView, the FSR `t.ref` input), the RR input set (`rrTry`) and the DLSS RR overlay colour input (`rrOverlayNow`: "the colour input is the opaque scene, mRefract was copied this frame"), as well as the water FS. * `mPrevColor`: RCAS sharpening on native frames without a temporal resolve (`updateRcasSets`, `recordRcas`), the VRS rate image (`ensureVrs`: luminance of last frame), snapshots (they swap it in `beginOffscreen` / `endOffscreen`), and SSR / water. * `mPrevDepth`: SSR, the per-view reprojection list, and possibly the GI lag-depth question (item 8 of the audit). A liveness free therefore needs every one of these gated: TAA / FSR / RR on, RCAS amount > 0, VRS on, water in view, SSR on. ## Proposed design * Per image, a `wanted` predicate built from its readers, with free on liveness (10 s grace, like `mAoNormal` / #1432). * 1x1 placeholders bound while freed, so set 0 bindings 7 / 8 and the water set stay valid. * A missing image counts as no history: SSR and the reactive reference treat it like the first frame after a resize. * VKMem logs the set's state. ## Risks * A reader missed in the audit samples a placeholder (wrong image for a frame, no crash). * History restart pops when a reader turns on.
sky_line added this to the Slipstream project 2026-11-21 19:29:00 +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#1663
No description provided.