Skin (face/head) stays black on a low-frame-rate machine: RECHECK_FRAMES is counted in frames, so its time window doubles at half the console's frame rate #2608

Open
opened 2026-11-29 08:41:54 +00:00 by zhengyuanrouying-code · 5 comments
zhengyuanrouying-code commented 2026-11-29 08:41:54 +00:00 (Migrated from github.com)
Contributor

Imported from ubiquitarianism/leonida. Originally posted by zhengyuanrouying-code on 2026-11-29T08:41:54Z.


Summary

On my machine (Ryzen 5 5600, RTX 4070, 24 GB, Windows 11) the d3d12 runtime runs the world at 12–14 fps, about a third of the console's 30. At that rate Jason's body skin appeared but his head/face stayed black for the whole run, no matter how long I waited.

The cause turned out to be RECHECK_FRAMES in crates/leonida-gpu/src/draw.rs:

const RECHECK_FRAMES: [u64; 5] = [4, 12, 40, 120, 400];

These are frame counts, not seconds. They sum to 576 frames:

at 30 fps (console) at 14 fps (this machine)
19.2 s 41.1 s

The textures are streamed and rewritten well after their views are written. At 14 fps the early re-looks (4, 12, 40 frames) happen while the texture is still being written, so each look finds it changed and uploads it again — and the texture never settles. The head texture is much larger than the hands', so it needs longer to finish writing, and it kept losing the race.

Making the schedule slower fixed it. I changed it to:

const RECHECK_FRAMES: [u64; 5] = [8, 24, 80, 240, 800];   // sums to 1152 frames

At 14 fps that is 82 s, but the texture now finishes writing before the look, so it is uploaded once, correctly, instead of being re-uploaded repeatedly. Body and head then both appear within about a minute.

Reproduction

  1. LEONIDA_PAGE_WRITES=all (needed for the body; without it the body stays black too)
  2. Series X profile, -Resolution 1080, stock RECHECK_FRAMES
  3. Load a save, walk in the open world
  4. Body skin appears; head stays black indefinitely (I waited several minutes)

Changing LEONIDA_HEAP_RECHECK_EVERY alone does not help here — that variable only governs the looks after the five in RECHECK_FRAMES, and by then the damage is done.

Measurements

RECHECK_FRAMES sum body head fps
[4, 12, 40, 120, 400] (stock) 576 black black 13–15
[2, 6, 20, 60, 120] 208 appeared late black 13
[8, 24, 80, 240, 800] 1152 appeared fast appeared 12.6

Frame breakdown at 12.6 fps, 4,326 draws/frame:

12.6 fps, 79.5 ms/frame
  preparing    49.9 ms
    copies     18.1 ms  42.6 MB
    textures    1.6 ms  23.9 MB
  copying back 20.9 ms   1.0 MB
  GPU           0.2 ms

Suggestion

Two possible fixes, both small:

  1. Scale the schedule by frame time instead of counting frames — e.g. keep the seconds the console would take. That is what the schedule evidently means to express.
  2. Expose RECHECK_FRAMES as a switch (e.g. LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800) so low-frame-rate machines can retune it without patching the source. LEONIDA_HEAP_RECHECK_EVERY already exists and does not cover this — users reasonably assume it does.

Environment

CPU          AMD Ryzen 5 5600 (6C/12T, 4801 MHz fixed)
GPU          NVIDIA GeForce RTX 4070 12 GB, driver 32.0.16.2101
RAM          23.9 GB
OS           Windows 11 家庭版 10.0.26200
Launch       scripts\play-d3d12.ps1 -Game <dir> -SeriesX -Resolution 1080 -Log
Settings     LEONIDA_PAGE_WRITES=all
             LEONIDA_HEAP_RECHECK_EVERY=300
Build        target\diag, built from main 2026-11-29, features diagnostics,mimalloc

Other observations from the same session (lower confidence)

  • LEONIDA_HEAP_RECHECK_EVERY=100 made the frame rate collapse to 3–6 fps with 150–240 MB of texture uploads per frame; the default 300 is much better and reaches the same visual result once RECHECK_FRAMES is given enough time.
  • Setting LEONIDA_CARD_BUFFERS_MB=768 (down from the default 1536) raised copying back from ~10 ms to ~50 ms on this 12 GB card. The default is right.
  • LEONIDA_WINDOWS_BAR_MB=0 had the same effect (~50 ms copying back), consistent with #2578's finding that the setting does not change fps, but on this card it made the copy-back path slower.

Happy to test a patch. Thank you for the project — it is the only way I get to play this.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:6676724163 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2608). Originally posted by [zhengyuanrouying-code](https://github.com/zhengyuanrouying-code) on 2026-11-29T08:41:54Z. --- ## Summary On my machine (Ryzen 5 5600, RTX 4070, 24 GB, Windows 11) the d3d12 runtime runs the world at **12–14 fps**, about a third of the console's 30. At that rate Jason's **body skin appeared but his head/face stayed black for the whole run**, no matter how long I waited. The cause turned out to be `RECHECK_FRAMES` in `crates/leonida-gpu/src/draw.rs`: ```rust const RECHECK_FRAMES: [u64; 5] = [4, 12, 40, 120, 400]; ``` These are **frame counts**, not seconds. They sum to 576 frames: | at 30 fps (console) | at 14 fps (this machine) | |---|---| | 19.2 s | 41.1 s | The textures are streamed and rewritten well after their views are written. At 14 fps the early re-looks (4, 12, 40 frames) happen while the texture is **still being written**, so each look finds it changed and uploads it again — and the texture never settles. The head texture is much larger than the hands', so it needs longer to finish writing, and it kept losing the race. **Making the schedule slower fixed it.** I changed it to: ```rust const RECHECK_FRAMES: [u64; 5] = [8, 24, 80, 240, 800]; // sums to 1152 frames ``` At 14 fps that is 82 s, but the texture now finishes writing before the look, so it is uploaded **once, correctly**, instead of being re-uploaded repeatedly. Body **and** head then both appear within about a minute. ## Reproduction 1. `LEONIDA_PAGE_WRITES=all` (needed for the body; without it the body stays black too) 2. Series X profile, `-Resolution 1080`, stock `RECHECK_FRAMES` 3. Load a save, walk in the open world 4. Body skin appears; **head stays black indefinitely** (I waited several minutes) Changing `LEONIDA_HEAP_RECHECK_EVERY` alone does **not** help here — that variable only governs the looks *after* the five in `RECHECK_FRAMES`, and by then the damage is done. ## Measurements | `RECHECK_FRAMES` | sum | body | head | fps | |---|---|---|---|---| | `[4, 12, 40, 120, 400]` (stock) | 576 | black | black | 13–15 | | `[2, 6, 20, 60, 120]` | 208 | appeared late | black | 13 | | `[8, 24, 80, 240, 800]` | 1152 | appeared fast | **appeared** | 12.6 | Frame breakdown at 12.6 fps, 4,326 draws/frame: ``` 12.6 fps, 79.5 ms/frame preparing 49.9 ms copies 18.1 ms 42.6 MB textures 1.6 ms 23.9 MB copying back 20.9 ms 1.0 MB GPU 0.2 ms ``` ## Suggestion Two possible fixes, both small: 1. **Scale the schedule by frame time** instead of counting frames — e.g. keep the *seconds* the console would take. That is what the schedule evidently means to express. 2. **Expose `RECHECK_FRAMES` as a switch** (e.g. `LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800`) so low-frame-rate machines can retune it without patching the source. `LEONIDA_HEAP_RECHECK_EVERY` already exists and does not cover this — users reasonably assume it does. ## Environment ``` CPU AMD Ryzen 5 5600 (6C/12T, 4801 MHz fixed) GPU NVIDIA GeForce RTX 4070 12 GB, driver 32.0.16.2101 RAM 23.9 GB OS Windows 11 家庭版 10.0.26200 Launch scripts\play-d3d12.ps1 -Game <dir> -SeriesX -Resolution 1080 -Log Settings LEONIDA_PAGE_WRITES=all LEONIDA_HEAP_RECHECK_EVERY=300 Build target\diag, built from main 2026-11-29, features diagnostics,mimalloc ``` ## Other observations from the same session (lower confidence) - `LEONIDA_HEAP_RECHECK_EVERY=100` made the frame rate collapse to 3–6 fps with 150–240 MB of texture uploads per frame; the default 300 is much better and reaches the same visual result once `RECHECK_FRAMES` is given enough time. - Setting `LEONIDA_CARD_BUFFERS_MB=768` (down from the default 1536) **raised** `copying back` from ~10 ms to ~50 ms on this 12 GB card. The default is right. - `LEONIDA_WINDOWS_BAR_MB=0` had the same effect (~50 ms `copying back`), consistent with #2578's finding that the setting does not change fps, but on this card it made the copy-back path slower. Happy to test a patch. Thank you for the project — it is the only way I get to play this.
zhengyuanrouying-code commented 2026-11-29 09:26:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by zhengyuanrouying-code on 2026-11-29T09:26:57Z.


Confirmed with screenshots, and a narrower window than I first thought

Two screenshots from the same spot, same save, same settings — the only difference is RECHECK_FRAMES:

[9, 27, 90, 270, 900] (2.25×) — the man stays black:

屏幕截图 2026-11-29 171604

[8, 24, 80, 240, 800] (2×) — both characters render:

屏幕截图 2026-11-29 172018

Note the earlier state on the same run, [9, 27, 90, 270, 900] at 17:10 — the woman is already correct while the man is still black, so the two characters are not on the same schedule:

屏幕截图 2026-11-29 171012

The window is narrow

RECHECK_FRAMES scale sum texture re-uploads head rendered
[4, 12, 40, 120, 400] (stock) 1× 576 — no
[2, 6, 20, 60, 120] 0.5× 208 — no
[6, 18, 60, 180, 600] 1.5× 864 — no
[7, 21, 70, 210, 700] 1.75× 1008 472 not reached
[8, 24, 80, 240, 800] 2× 1152 219 yes
[9, 27, 90, 270, 900] 2.25× 1296 226 no

The re-upload count is the useful signal: it bottoms out at 2× (219) and doubles at 1.75× (472). 2.25× is close in count (226) but still misses, which suggests the last look's timing matters as much as the total.

So a single "scale by frame time" factor is probably not enough. What would help more:

  1. Repeat the last look — after the five in RECHECK_FRAMES, keep looking every N frames regardless of LEONIDA_HEAP_RECHECK_EVERY, so a texture that settles late is still caught.
  2. Look again on a change to the slot's neighbours — the characters are one slot range; a cheap trigger would be nearby slots being uploaded.
  3. Just expose it — LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800 lets each machine find its own window without a rebuild. That is all I needed in the end.

Everything else about the runtime is working well for me at 12–14 fps, which I understand is in line with the project's current numbers. Thanks again.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253769858 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2608#issuecomment-7253769858). Originally posted by [zhengyuanrouying-code](https://github.com/zhengyuanrouying-code) on 2026-11-29T09:26:57Z. --- # Confirmed with screenshots, and a narrower window than I first thought Two screenshots from the same spot, same save, same settings — the only difference is `RECHECK_FRAMES`: **`[9, 27, 90, 270, 900]` (2.25×) — the man stays black:** <img width="2542" height="1431" alt="屏幕截图 2026-11-29 171604" src="https://github.com/user-attachments/assets/835c9c87-4372-4456-8452-ff24af529d11" /> **`[8, 24, 80, 240, 800]` (2×) — both characters render:** <img width="2542" height="1431" alt="屏幕截图 2026-11-29 172018" src="https://github.com/user-attachments/assets/d342e98f-a838-480f-a64a-b1b2d3dbf8b9" /> Note the earlier state on the same run, `[9, 27, 90, 270, 900]` at 17:10 — the woman is already correct while the man is still black, so the two characters are not on the same schedule: <img width="2542" height="1431" alt="屏幕截图 2026-11-29 171012" src="https://github.com/user-attachments/assets/09e48a5e-624d-4fd7-bd32-7a0abf96c592" /> ## The window is narrow | `RECHECK_FRAMES` | scale | sum | texture re-uploads | head rendered | |---|---|---|---|---| | `[4, 12, 40, 120, 400]` (stock) | 1× | 576 | — | no | | `[2, 6, 20, 60, 120]` | 0.5× | 208 | — | no | | `[6, 18, 60, 180, 600]` | 1.5× | 864 | — | no | | `[7, 21, 70, 210, 700]` | 1.75× | 1008 | 472 | not reached | | `[8, 24, 80, 240, 800]` | **2×** | **1152** | **219** | **yes** | | `[9, 27, 90, 270, 900]` | 2.25× | 1296 | 226 | no | The re-upload count is the useful signal: it bottoms out at 2× (219) and doubles at 1.75× (472). 2.25× is close in count (226) but still misses, which suggests the *last* look's timing matters as much as the total. So a single "scale by frame time" factor is probably not enough. What would help more: 1. **Repeat the last look** — after the five in `RECHECK_FRAMES`, keep looking every N frames regardless of `LEONIDA_HEAP_RECHECK_EVERY`, so a texture that settles late is still caught. 2. **Look again on a change to the slot's neighbours** — the characters are one slot range; a cheap trigger would be nearby slots being uploaded. 3. **Just expose it** — `LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800` lets each machine find its own window without a rebuild. That is all I needed in the end. Everything else about the runtime is working well for me at 12–14 fps, which I understand is in line with the project's current numbers. Thanks again.
merzleckeier commented 2026-11-29 12:37:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T12:37:54Z.


The test branch at 5b3900bc0 exposes the five initial intervals. With the same executable and save, leave LEONIDA_HEAP_RECHECK_FRAMES unset for the original 4,12,40,120,400, or set $env:LEONIDA_HEAP_RECHECK_FRAMES = "8,24,80,240,800" in PowerShell before starting the existing launcher. Keep LEONIDA_HEAP_RECHECK_EVERY at the same value in both runs. An invalid list uses the original values.

The Windows x64 build and targeted parser test passed under Wine 11.22. Four isolated processes verified unset, valid and invalid input, and independence from LEONIDA_HEAP_RECHECK_EVERY. The full crate suite had 534 passes, with the same four failures as unmodified cc0f662a under this Wine setup. The visual result on the reported setup is still open. Coordination claim. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7255951662 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2608#issuecomment-7255951662). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T12:37:54Z. --- The [test branch at `5b3900bc0`](https://github.com/merzleckeier/mandy/commit/5b3900bc03adc550671bbc0df8aa3a71ad298a02) exposes the five initial intervals. With the same executable and save, leave `LEONIDA_HEAP_RECHECK_FRAMES` unset for the original `4,12,40,120,400`, or set `$env:LEONIDA_HEAP_RECHECK_FRAMES = "8,24,80,240,800"` in PowerShell before starting the existing launcher. Keep `LEONIDA_HEAP_RECHECK_EVERY` at the same value in both runs. An invalid list uses the original values. The Windows x64 build and targeted parser test passed under Wine 11.22. Four isolated processes verified unset, valid and invalid input, and independence from `LEONIDA_HEAP_RECHECK_EVERY`. The full crate suite had 534 passes, with the same four failures as unmodified `cc0f662a` under this Wine setup. The visual result on the reported setup is still open. [Coordination claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7255896476). AI-assisted with OpenAI Codex.
Diegobecker07 commented 2026-11-29 16:59:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Diegobecker07 on 2026-11-29T16:59:12Z.


PROVISIONAL (n=1 each way, not yet a clean A/B): a data point from a different machine. With the stock schedule the face was missing, and with LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800 from merzleckeier's test commit it was drawn. The two runs differ in more than that variable (listed below), so this is not proof yet.

RUN 1 | 2026-11-29 | Diegobecker07 | AI-assisted: yes
BASE:        c22a0a732, no pull requests | shaders: translated at start by play-d3d12.ps1
MACHINE:     RTX 5070 Ti 16 GB, desktop (Ryzen 9 5900X) | 621.40 | Windows 11 Pro 26300 | 48 GB
RECIPE:      documented (README, "Starting it") + DEVIATIONS: none | precompile: shaders yes, pipelines none (first start)
OS/DRIVER:   NVIDIA shader cache size: driver default
TARGET:      the player character's face drawn | PREDICTED (written before the run): none
MEASURED:    face missing (eyes and teeth only) for several minutes | frame rate under 1 fps while pipelines compiled (CPU about 19 of 24 threads busy, GPU 0-3 %)
END:         closed by the player
CACHES:      cold (first start) | RUN 1 of 1
INSTRUMENTS: none
VERDICT:     no prediction
RUN 2 | 2026-11-29 | Diegobecker07 | AI-assisted: yes
BASE:        c22a0a732 + 5b3900bc0 (merzleckeier's test commit, built locally) | shaders: RUN 1's cache
MACHINE:     same as RUN 1
RECIPE:      documented (README, "Starting it") + DEVIATIONS: LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800 | precompile: yes, warm --used from RUN 1's pipelines
OS/DRIVER:   NVIDIA shader cache size: unlimited (changed between the runs)
TARGET:      the player character's face drawn | PREDICTED (written before the run): face drawn within about a minute, as in this issue
MEASURED:    face drawn | 7.6 fps rendered, about 14 shown with frame generation (F3, read by eye)
END:         closed by the player
CACHES:      warm (shader cache, driver cache and pipeline list from RUN 1) | RUN 1 of 1
INSTRUMENTS: none
VERDICT:     prediction held

What differs besides the variable: the executable (RUN 1 has no test commit), cold against warm caches, the frame rate (under 1 fps against 7.6), and the driver's shader cache size. What would refute the reading: the face also being drawn with RUN 2's executable and the variable unset, at the same spot with warm caches. That would mean RUN 1's cold first session explains the missing face, not the intervals. That same-executable A/B is the next run here, and I'll post it under this comment.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259329928 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2608#issuecomment-7259329928). Originally posted by [Diegobecker07](https://github.com/Diegobecker07) on 2026-11-29T16:59:12Z. --- PROVISIONAL (n=1 each way, not yet a clean A/B): a data point from a different machine. With the stock schedule the face was missing, and with `LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800` from merzleckeier's test commit it was drawn. The two runs differ in more than that variable (listed below), so this is not proof yet. ``` RUN 1 | 2026-11-29 | Diegobecker07 | AI-assisted: yes BASE: c22a0a732, no pull requests | shaders: translated at start by play-d3d12.ps1 MACHINE: RTX 5070 Ti 16 GB, desktop (Ryzen 9 5900X) | 621.40 | Windows 11 Pro 26300 | 48 GB RECIPE: documented (README, "Starting it") + DEVIATIONS: none | precompile: shaders yes, pipelines none (first start) OS/DRIVER: NVIDIA shader cache size: driver default TARGET: the player character's face drawn | PREDICTED (written before the run): none MEASURED: face missing (eyes and teeth only) for several minutes | frame rate under 1 fps while pipelines compiled (CPU about 19 of 24 threads busy, GPU 0-3 %) END: closed by the player CACHES: cold (first start) | RUN 1 of 1 INSTRUMENTS: none VERDICT: no prediction ``` ``` RUN 2 | 2026-11-29 | Diegobecker07 | AI-assisted: yes BASE: c22a0a732 + 5b3900bc0 (merzleckeier's test commit, built locally) | shaders: RUN 1's cache MACHINE: same as RUN 1 RECIPE: documented (README, "Starting it") + DEVIATIONS: LEONIDA_HEAP_RECHECK_FRAMES=8,24,80,240,800 | precompile: yes, warm --used from RUN 1's pipelines OS/DRIVER: NVIDIA shader cache size: unlimited (changed between the runs) TARGET: the player character's face drawn | PREDICTED (written before the run): face drawn within about a minute, as in this issue MEASURED: face drawn | 7.6 fps rendered, about 14 shown with frame generation (F3, read by eye) END: closed by the player CACHES: warm (shader cache, driver cache and pipeline list from RUN 1) | RUN 1 of 1 INSTRUMENTS: none VERDICT: prediction held ``` What differs besides the variable: the executable (RUN 1 has no test commit), cold against warm caches, the frame rate (under 1 fps against 7.6), and the driver's shader cache size. What would refute the reading: the face also being drawn with RUN 2's executable and the variable unset, at the same spot with warm caches. That would mean RUN 1's cold first session explains the missing face, not the intervals. That same-executable A/B is the next run here, and I'll post it under this comment. AI-assisted.
Diegobecker07 commented 2026-11-29 17:19:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by Diegobecker07 on 2026-11-29T17:19:42Z.


Follow-up to my PROVISIONAL data point above: a same-executable A/B refutes my reading for this machine.

RUN 3 | 2026-11-29 | Diegobecker07 | AI-assisted: yes
BASE:        c22a0a732 + 5b3900bc0, the same executable as RUN 2 | shaders: cached
MACHINE:     same as RUN 1
RECIPE:      documented (README, "Starting it") + DEVIATIONS: none (LEONIDA_HEAP_RECHECK_FRAMES unset; started from a fresh terminal) | precompile: yes, warm --used
OS/DRIVER:   NVIDIA shader cache size: unlimited, as in RUN 2
TARGET:      the player character's face drawn | PREDICTED (written before the run): none
MEASURED:    face drawn | 7 fps rendered, about 12 shown with frame generation (F3, read by eye)
END:         still running when reported
CACHES:      warm | RUN 1 of 1
INSTRUMENTS: none
VERDICT:     no prediction

RUN 2 and RUN 3 used the same executable, warm caches and the same driver setting. The face was drawn with the stock intervals (RUN 3) as well as with 8,24,80,240,800 (RUN 2). So on this machine, at 7 to 8 rendered fps, the missing face in RUN 1 came with the cold first session (under 1 fps while pipelines compiled), not from the recheck intervals, and my RUN 2 is no evidence for the change here. This does not contradict the 12-14 fps report at the top, which comes from a different machine.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259602859 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2608#issuecomment-7259602859). Originally posted by [Diegobecker07](https://github.com/Diegobecker07) on 2026-11-29T17:19:42Z. --- Follow-up to my PROVISIONAL data point above: a same-executable A/B refutes my reading for this machine. ``` RUN 3 | 2026-11-29 | Diegobecker07 | AI-assisted: yes BASE: c22a0a732 + 5b3900bc0, the same executable as RUN 2 | shaders: cached MACHINE: same as RUN 1 RECIPE: documented (README, "Starting it") + DEVIATIONS: none (LEONIDA_HEAP_RECHECK_FRAMES unset; started from a fresh terminal) | precompile: yes, warm --used OS/DRIVER: NVIDIA shader cache size: unlimited, as in RUN 2 TARGET: the player character's face drawn | PREDICTED (written before the run): none MEASURED: face drawn | 7 fps rendered, about 12 shown with frame generation (F3, read by eye) END: still running when reported CACHES: warm | RUN 1 of 1 INSTRUMENTS: none VERDICT: no prediction ``` RUN 2 and RUN 3 used the same executable, warm caches and the same driver setting. The face was drawn with the stock intervals (RUN 3) as well as with `8,24,80,240,800` (RUN 2). So on this machine, at 7 to 8 rendered fps, the missing face in RUN 1 came with the cold first session (under 1 fps while pipelines compiled), not from the recheck intervals, and my RUN 2 is no evidence for the change here. This does not contradict the 12-14 fps report at the top, which comes from a different machine. AI-assisted.
fiestorra commented 2026-11-30 04:33:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T04:33:21Z.


A narrow point that saves whoever fixes this a second investigation: the C++ runtime does not have the same frame-counted schedule, so this change does not need a counterpart there.

What I checked in runtime/ (grep for RECHECK, FRAMES, frame-counted comparisons):

  • runtime/shims/d3d12_compute_input_probe.h:207 has a recheck() but it is a per-state probe, not a schedule;
  • runtime/shims/d3d12_vulkan_device.cpp:16925 onwards is the title's texture rechecks - the same problem area as your RECHECK_FRAMES - and it is counted in wall time and attempts (probes, waited, rechecks[where] += waited), with the totals printed at :17801. Nothing there is measured in frames, so a machine at 12 fps does not get a longer window by construction.

So the frame/seconds confusion is in crates/leonida-gpu/src/draw.rs alone, which is what your fix addresses.

One thing worth deciding before the change lands, and it is the only part of your report I would push back on: doubling the schedule fixes the symptom by making the window longer than the write, which means on a fast machine it now waits ~80 s of frames before the last look - the texture is correct, but late. If the ordering guarantee is what is missing (the view written before the texture finishes), an event or "upload when the write lands" is the fix that does not trade one machine's correctness for another machine's latency. Your measurement proves the window is too short at 14 fps; it does not yet show that a longer window is the only way to close it.

What I cannot do: this machine has no cargo, so d3d12/ does not build here and I cannot measure either version. The above is read from the C++ side, which I can build and run.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7268878535 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2608#issuecomment-7268878535). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T04:33:21Z. --- A narrow point that saves whoever fixes this a second investigation: **the C++ runtime does not have the same frame-counted schedule**, so this change does not need a counterpart there. What I checked in `runtime/` (grep for `RECHECK`, `FRAMES`, frame-counted comparisons): - `runtime/shims/d3d12_compute_input_probe.h:207` has a `recheck()` but it is a per-state probe, not a schedule; - `runtime/shims/d3d12_vulkan_device.cpp:16925` onwards is the title's **texture rechecks** - the same *problem area* as your `RECHECK_FRAMES` - and it is counted in **wall time and attempts** (`probes`, `waited`, `rechecks[where] += waited`), with the totals printed at `:17801`. Nothing there is measured in frames, so a machine at 12 fps does not get a longer window by construction. So the frame/seconds confusion is in `crates/leonida-gpu/src/draw.rs` alone, which is what your fix addresses. **One thing worth deciding before the change lands**, and it is the only part of your report I would push back on: doubling the schedule fixes the symptom by making the window **longer than the write**, which means on a fast machine it now waits ~80 s of frames before the last look - the texture is correct, but late. If the ordering guarantee is what is missing (the view written before the texture finishes), an event or "upload when the write lands" is the fix that does not trade one machine's correctness for another machine's latency. Your measurement proves the window is too short at 14 fps; it does not yet show that a longer window is the only way to close it. **What I cannot do:** this machine has no `cargo`, so `d3d12/` does not build here and I cannot measure either version. The above is read from the C++ side, which I can build and run. Written with an AI assistant.
Sign in to join this conversation.
No labels
No milestone
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.

Reference
ProjectLeonida/mandy#2608
No description provided.