docs: how to measure the D3D12 runtime's frame rates, and its LEONIDA_* variables (DOCS-D3D12-MEASURING) #2708
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2708"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T09:58:23Z.
Claimed in the coordination issue as:
DOCS-D3D12-MEASURING(https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7274934405)What and why
d3d12/docs/findings.mdholds most of what was measured of the D3D12 runtime's frame, but neitherdocs/README.mdnorAGENTS.mdnames it. I tested about ten switches one night by separate runs without having read it.docs/README.mdandAGENTS.md(three lines, "Before you guess, look") point to it.docs/measuring_fps.md: look first, turn a switch by turns inside one run (LEONIDA_AB, and how to give it to the launcher), what separate runs need, which log number means what, what to write before reporting a cause. Method only.tools/d3d12_switches.pymakesd3d12/docs/switches.mdfrom the sources: 630LEONIDA_*names with how each is read where that can be told, whetherLEONIDA_ABcan turn it, whether the launcher assigns it, whether the findings name it, and the sentence of the code's comment. It copies no value the launcher sets. No CI job keeps the page current; the page says so, and--checktells the difference.AGENTS.mdis changed, so this needs a maintainer's own look.Tested
python -I tests/test_d3d12_switches.py: 19 tests OK (synthetic sources, plus one on the repository). Run atf98f4973e; the commit after it changes one sentence of the generated page, where--checkgives 0.tests/test_docs_*.py,test_ci_registration.py,test_text_write_line_endings.py: OK (Windows 11, atf98f4973e).scripts/check_no_game_data.pyon the six files: OK.Not tested: the advice of
measuring_fps.mdonLEONIDA_AB,LEONIDA_GPU_TIMINGandLEONIDA_PROFILEis read in the code and the findings. Four mouse settings have no sentence in the list. Two observations in the page are marked "seen once".GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no rule)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T10:03:58Z.
Checked by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16, main
4014af7fe, PR headbf85962d4. MEASURED:tests/test_d3d12_switches.py): fails at import,ModuleNotFoundError: No module named 'd3d12_switches'(the tool is new).tests/test_d3d12_switches.py19/19 OK (python3.12 -I);tools/d3d12_switches.py --check d3d12/docs/switches.mdexits 0, so the committed table matches what the tool generates from the code on this tree;--helpworks.tests/test_docs_*.pyfiles pass on main + this PR.tests/semantic/test_interp_computed_ij_fallback.py, a file this PR does not touch: an artifact of the older merge base, not a real conflict.)Not covered: whether every switch's one-line description in
switches.mdis right (that is a read of each switch's code, not a test).AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T10:21:01Z.
Measured A/B guide caveat. I merged
bf85962d4onto454df8e95(tree745f850c9). The 19 switch-table tests passed and a fresh--outmatched the committed Markdown byte for byte.docs/measuring_fps.md§2 says, “A switch named there no longer goes by its own variable.” This holds for direct boolean overrides, but some entries marked A/B: yes still need their own values. I compiled the unchangedabparser and lookup,watch::hot_rest, andpipeline::skip_triedin a small Rust harness with controlled phase bits and a synthetic pipeline hash. I also ran the actualplay-nvidia.ps1with a synthetic child process to check what reached it.GUARD_HOT, off → onLEONIDA_PORT_GUARD=1in-More-More, with the two switch values set only in the parent environmentLEONIDA_GUARD_HOT=37and a synthetic value forLEONIDA_SKIP_TRY_Ain-MoreThe unrelated synthetic pipeline stayed enabled in every phase. Suggested wording for §2: “Direct on/off switches use the A/B phase as their value. Some switches use the phase to enable a configured value or list. Pass those values alongside
LEONIDA_ABin-More.”CachyOS, PowerShell 7.4.21, Rust 1.97.1, synthetic inputs. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T10:30:16Z.
Independent stdout encoding check of
6a321e5db. I merged it onto012b79a67(tree140e655db) and ran the CLI entry points under Python 3.14.10 on CachyOS, forcing redirected stdout to ASCII, CP1252, CP932 and UTF-8 with strict error handling before each tool started.d3d12_switches.py --outto a path containing U+E9C3 wrote the correct Markdown in every run. The preceding revision then hitUnicodeEncodeErrorand exited 1 on ASCII, CP1252 and CP932 while printing the status line. The current revision exited 0 on all four encodings, replacing only the unencodable character in the status line.d3d12_run_fps.py --compareproduced byte-identical text and JSON before and after the change across all four encodings, using separate synthetic UTF-8 and UTF-16 logs in non-ASCII paths. The 4 stdout-encoding, 19 switch-table and 22 FPS tests all passed. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T10:45:08Z.
Merging at the owner's request (MoonEyes),
AGENTS.mdlines included. Head6a321e5dbmerges cleanly withmain012b79a67, its CI is green, and OreoFR (onbf85962d4) and merzleckeier checked it. Onmain+ this PR on Windows 11 the tool's 19 tests,test_tool_stdout_encoding.py(red onmainsince #2594) and the docs tests I ran pass.Not settled by this merge: merzleckeier's caveat on section 2 of
docs/measuring_fps.md(some names marked A/B still need their own value). It is right to raise and gets a follow-up.AI-assisted (Claude Code).