FR-DSP-4 — Progressive refinement #24

Closed
opened 2026-09-05 16:20:12 +00:00 by dtourolle · 2 comments
Owner

FR-DSP-4 — Progressive refinement. Unbuilt.

What it is not

FR-DSP-1's proxy rendering and TD-4's quarter-resolution base are adjacent and are not this. Both are fixed choices about what resolution to compute at. FR-DSP-4 asks for a first frame that is deliberately cheap and a second that replaces it.

Nothing in the tree tracks a "this frame is provisional" state.

Why it matters more than it looks

It is the difference between a slider that feels instant and one that feels correct, and the honest answer is that an editor needs both. It also degrades gracefully on exactly the devices where the fused dispatch stops fitting the budget — which makes it the cheaper half of the answer #23 is trying to settle.

Acceptance

  • A render carries a provisional flag through to the compositor.
  • A provisional frame is replaced rather than accumulated onto.
  • Interaction cancels a refinement in flight rather than queueing behind it.
  • The histogram and any readout state which frame they describe.

See docs/outstanding.md §4.

**FR-DSP-4 — Progressive refinement.** Unbuilt. ## What it is not FR-DSP-1's proxy rendering and TD-4's quarter-resolution base are adjacent and are **not** this. Both are fixed choices about what resolution to compute at. FR-DSP-4 asks for a first frame that is deliberately cheap and a second that **replaces** it. Nothing in the tree tracks a "this frame is provisional" state. ## Why it matters more than it looks It is the difference between a slider that feels instant and one that feels correct, and the honest answer is that an editor needs both. It also degrades gracefully on exactly the devices where the fused dispatch stops fitting the budget — which makes it the cheaper half of the answer #23 is trying to settle. ## Acceptance - [ ] A render carries a provisional flag through to the compositor. - [ ] A provisional frame is replaced rather than accumulated onto. - [ ] Interaction cancels a refinement in flight rather than queueing behind it. - [ ] The histogram and any readout state which frame they describe. See `docs/outstanding.md` §4.
dtourolle added the uiunmet-requirementsize:Mgpu labels 2026-09-05 16:20:12 +00:00
Author
Owner

Progress check (2026-09-24). Part of the premise is out of date: a draft/settle mechanism has existed since 75ce384 (SETTLE_DELAY 120 ms, drafts at half size, build_redraw renders sharp after settle, in ui/dr-ui/src/lib.rs).

  • a provisional frame is replaced, not accumulated onto
  • [~] histograms are computed on settled frames only, but nothing says which frame a readout describes
  • the draft flag stops at the render closure and never reaches the compositor
  • interaction does not cancel refinement. From reading the code, the settle timer is armed once and not re-armed by later drag events, so a sharp render may fire mid-drag. Not confirmed at runtime.
  • no smooth transition from the draft to the sharp frame; no FR-DSP-4 tag
Progress check (2026-09-24). Part of the premise is out of date: a draft/settle mechanism has existed since 75ce384 (`SETTLE_DELAY` 120 ms, drafts at half size, `build_redraw` renders sharp after settle, in `ui/dr-ui/src/lib.rs`). - [x] a provisional frame is replaced, not accumulated onto - [~] histograms are computed on settled frames only, but nothing says which frame a readout describes - [ ] the draft flag stops at the render closure and never reaches the compositor - [ ] interaction does not cancel refinement. From reading the code, the settle timer is armed once and not re-armed by later drag events, so a sharp render may fire mid-drag. Not confirmed at runtime. - [ ] no smooth transition from the draft to the sharp frame; no FR-DSP-4 tag
Author
Owner

Merged to master: 7d0870c, 4642c77, ade627a.

  1. Mid-drag sharp renders: confirmed and fixed. With the old logic, a simulated 600 ms drag rendered sharp frames at 121, 249, 377 and 505 ms, because the settle timer was armed once per burst. The decision now lives in ui/dr-ui/src/refine.rs. Every draft arms a settle with a token, and only the newest one renders sharp, SETTLE_DELAY after the last movement. Seven unit tests cover it, including the long-drag regression.
  2. The draft flag reaches the UI. canvas-draft and Levels.provisional are set on every render. The histogram's Display reading dims while a draft is shown, since it describes the last settled frame.
  3. The swap is smooth. The last draft fades out over 150 ms on top of the sharp frame. It reuses the image already rendered, so no extra render. The adjust pass alternates two output textures so the fade source is never overwritten.

FR-DSP-4 is now tagged and counted as covered.

Known quirk: holding compare-original within the 120 ms settle window after a drag makes the last draft fade over the original. It is noted in app.slint. The dimming and the fade have not been checked by eye yet; that happens when the manual is recorded.

Merged to master: 7d0870c, 4642c77, ade627a. 1. **Mid-drag sharp renders: confirmed and fixed.** With the old logic, a simulated 600 ms drag rendered sharp frames at 121, 249, 377 and 505 ms, because the settle timer was armed once per burst. The decision now lives in `ui/dr-ui/src/refine.rs`. Every draft arms a settle with a token, and only the newest one renders sharp, `SETTLE_DELAY` after the last movement. Seven unit tests cover it, including the long-drag regression. 2. **The draft flag reaches the UI.** `canvas-draft` and `Levels.provisional` are set on every render. The histogram's Display reading dims while a draft is shown, since it describes the last settled frame. 3. **The swap is smooth.** The last draft fades out over 150 ms on top of the sharp frame. It reuses the image already rendered, so no extra render. The adjust pass alternates two output textures so the fade source is never overwritten. FR-DSP-4 is now tagged and counted as covered. Known quirk: holding compare-original within the 120 ms settle window after a drag makes the last draft fade over the original. It is noted in `app.slint`. The dimming and the fade have not been checked by eye yet; that happens when the manual is recorded.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dtourolle/DarkRoom#24