diagnostics: count rendered and generated frames without clearing presents twice #198

Manually merged
github merged 1 commit from github-bot/gh-198 into main 2026-12-02 19:57:24 +00:00 AGit
Owner

@⁠DecayingEagle on GitHub · 2026-12-02 14:57 UTC · original
DecayingEagle:codex/generated-frame-counts → main · +13 −2 · 2 files · 1 commits · merged 2026-12-02 19:54 UTC

The periodic stats: account line gains two interval totals, rendered_frames (successful host presents) and generated_frames (frames reported by successful FidelityFX callbacks). This lets a long run record frame production without VICTORY_PRESENT_TIMING on every frame. Neither field measures what reached the monitor. The existing FPS and per-frame costs still use rendered frames.

The statistics logger drained C::Frames, queried page faults and then cleared every counter including C::Frames again. A present between the two reads disappeared from both reporting intervals. Take each counter once and normalize from that sample. The extra callback counter is compiled only with diagnostics. The banks are concurrent so nearby events can fall across a reporting boundary.

Verification

  • Checked victory-gpu --tests for x86_64-pc-windows-msvc with and without diagnostics.
  • An isolated Rust harness used the source of the bank and drain operations. Injecting a present during the page fault query yielded one of two presents before the patch and both after. Twelve concurrent writers and a sampling reader retained all 120,000 rendered and 360,000 generated events.
  • A combined build on a 7900 XT under Wine passed 49 focused tests. Over 56.39 seconds spanning the transition into the world, the interval totals matched the detailed timing counter deltas exactly, 1,516 rendered and 1,349 generated. The run used #135, #163, #164, #173, #178, #179, #188, #191 and a local read-only diagnostic for #142. The comparison excludes the first incomplete sample.

Developed and tested with OpenAI Codex.

**@⁠DecayingEagle** on GitHub · 2026-12-02 14:57 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/198) `DecayingEagle:codex/generated-frame-counts` → `main` · +13 −2 · 2 files · 1 commits · merged 2026-12-02 19:54 UTC The periodic `stats: account` line gains two interval totals, `rendered_frames` (successful host presents) and `generated_frames` (frames reported by successful FidelityFX callbacks). This lets a long run record frame production without `VICTORY_PRESENT_TIMING` on every frame. Neither field measures what reached the monitor. The existing FPS and per-frame costs still use rendered frames. The statistics logger drained `C::Frames`, queried page faults and then cleared every counter including `C::Frames` again. A present between the two reads disappeared from both reporting intervals. Take each counter once and normalize from that sample. The extra callback counter is compiled only with diagnostics. The banks are concurrent so nearby events can fall across a reporting boundary. ### Verification - Checked `victory-gpu --tests` for x86_64-pc-windows-msvc with and without diagnostics. - An isolated Rust harness used the source of the bank and drain operations. Injecting a present during the page fault query yielded one of two presents before the patch and both after. Twelve concurrent writers and a sampling reader retained all 120,000 rendered and 360,000 generated events. - A combined build on a 7900 XT under Wine passed 49 focused tests. Over 56.39 seconds spanning the transition into the world, the interval totals matched the detailed timing counter deltas exactly, 1,516 rendered and 1,349 generated. The run used #135, #163, #164, #173, #178, #179, #188, #191 and a local read-only diagnostic for #142. The comparison excludes the first incomplete sample. Developed and tested with OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 14:57:45 +00:00
github manually merged commit 0a94194e25 into main 2026-12-02 19:57:24 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.