gpu: count texture rechecks separately and collect due slots in one pass #188

Manually merged
github merged 2 commits from github-bot/gh-188 into main 2026-12-02 23:01:25 +00:00 AGit
Owner

@⁠DecayingEagle on GitHub · 2026-12-02 13:53 UTC · original
DecayingEagle:codex/texture-queue-census → main · +75 −38 · 3 files · 2 commits · merged 2026-12-02 22:59 UTC

The panel and frame log count a completed texture upload scheduled for a fingerprint recheck as waiting for memory. Both paths set a positive look count. This makes the queue hard to interpret when investigating missing ground.

This patch reports full-upload rechecks separately. It keeps the oldest due descriptor's write age and adds the maximum delay since a look became due. Immediate writes use zero as the due frame, so the delay starts no earlier than the latest write. The due vectors and census now share one walk of the map under the same lock. Scheduling and priority rules are unchanged.

max_overdue_frames describes the latest heap pass. peak_overdue_frames retains the largest delay across all passes since the previous log, even if the queue recovered before the five-second sample. A quiet interval with no passes reports a zero peak.

Checks

  • New regression covers partial uploads, delayed checks, lost mappings with a retained fingerprint, held slots, rewrites and census-only calls. The existing ordering test covers zero due frames.
  • Under Wine, the descriptor suite went from 26 passing and 5 failing on d044248 to 27 passing and the same 5 failing. Failures cover raw view alignment, held slots and descriptor byte equality.
  • An offline Rust comparison of the old and new scans with 20,000 synthetic slots gave identical due vectors for 422 frame values. With 190 slots due, the scan median fell from 87 to 52 µs. With 19,130 due it fell from 107 to 93 µs. These are isolated CPU timings.
  • In a 128-second camera sweep on a 7900 XT under Wine at native 1440p, the median share of the old memory-wait count attributable to rechecks was 99.84%. Across 26 sampled intervals the maximum lateness was one frame, even with write ages up to 4,865 frames. This local test build also included #163, #164, #173, #178, #179 and a private controller harness.

The camera sweep predates the interval peak added in 6ca8538. That follow-up passed a Windows-target cargo check --tests with diagnostics. A standalone harness using the same atomic operations checked a transient peak, the reset, and concurrent writers during sampling.

This does not establish the cause of missing ground or a gain in game FPS. The runtime logs and title data were kept local.

Developed and tested with OpenAI Codex.

**@⁠DecayingEagle** on GitHub · 2026-12-02 13:53 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/188) `DecayingEagle:codex/texture-queue-census` → `main` · +75 −38 · 3 files · 2 commits · merged 2026-12-02 22:59 UTC The panel and frame log count a completed texture upload scheduled for a fingerprint recheck as waiting for memory. Both paths set a positive look count. This makes the queue hard to interpret when investigating missing ground. This patch reports full-upload rechecks separately. It keeps the oldest due descriptor's write age and adds the maximum delay since a look became due. Immediate writes use zero as the due frame, so the delay starts no earlier than the latest write. The due vectors and census now share one walk of the map under the same lock. Scheduling and priority rules are unchanged. `max_overdue_frames` describes the latest heap pass. `peak_overdue_frames` retains the largest delay across all passes since the previous log, even if the queue recovered before the five-second sample. A quiet interval with no passes reports a zero peak. ### Checks - New regression covers partial uploads, delayed checks, lost mappings with a retained fingerprint, held slots, rewrites and census-only calls. The existing ordering test covers zero due frames. - Under Wine, the descriptor suite went from 26 passing and 5 failing on `d044248` to 27 passing and the same 5 failing. Failures cover raw view alignment, held slots and descriptor byte equality. - An offline Rust comparison of the old and new scans with 20,000 synthetic slots gave identical due vectors for 422 frame values. With 190 slots due, the scan median fell from 87 to 52 µs. With 19,130 due it fell from 107 to 93 µs. These are isolated CPU timings. - In a 128-second camera sweep on a 7900 XT under Wine at native 1440p, the median share of the old memory-wait count attributable to rechecks was 99.84%. Across 26 sampled intervals the maximum lateness was one frame, even with write ages up to 4,865 frames. This local test build also included #163, #164, #173, #178, #179 and a private controller harness. The camera sweep predates the interval peak added in `6ca8538`. That follow-up passed a Windows-target `cargo check --tests` with diagnostics. A standalone harness using the same atomic operations checked a transient peak, the reset, and concurrent writers during sampling. This does not establish the cause of missing ground or a gain in game FPS. The runtime logs and title data were kept local. Developed and tested with OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 13:54:16 +00:00
github manually merged commit fc79d68a98 into main 2026-12-02 23:01:23 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.