Skip to content

docs/running.md: regenerate the DirectStorage predictor profile after 2a491668a (DOCS-RUNNING-DSTORAGE-HISTORY-REGEN) - #2502

Open
Tyrannys wants to merge 1 commit into
ProjectLeonida:mainfrom
Tyrannys:docs/running-dstorage-history-regen
Open

Tyrannys wants to merge 1 commit into
ProjectLeonida:mainfrom
Tyrannys:docs/running-dstorage-history-regen

Conversation

@Tyrannys

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: DOCS-RUNNING-DSTORAGE-HISTORY-REGEN (#1608 (comment))

What and why

2a491668a fixed the missing-endpoint BC7 tail requests (E_DSTORAGE_DECOMPRESSION_ERROR, #2019, #2396) in the fitter that writes the local DirectStorage predictor profile, <work>/shaders/bcpack/history.bcph. The runtime stage of make_game.py regenerates that profile; a runtime built with cmake or scripts/build_runtime.ps1 directly keeps the older one, so the fix does not take effect. This adds a line to "Settings every platform needs" in docs/running.md: when to rerun tools/build_dstorage_history.py, the command, and the load line that shows the new profile (4,406 of 6,144 BC7 endpoint fields instead of 4,228).

Tested

Docs only. python -I -m unittest discover -s tests -p "test_docs_*.py": 53 tests OK.

The numbers in the text are from profile M (RTX 4070 SUPER 12 GB, NVIDIA 621.01, Windows 11, 64 GB), main 2859d0c9b + open PRs, runtime built with cmake: with the old profile 7-8 decompression errors a run and the story load did not finish in 1,800 s (2 runs); after regenerating the profile 0 errors and the run reached the opening sequence (1 run). Regenerating took 11 minutes.

GPUs tested: n/a (docs); the report above is from an RTX 4070 SUPER, NVIDIA 621.01, Windows 11

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

…a49166

A runtime built without make_game.py's runtime stage keeps an older
history.bcph, so 2a49166's fix for the missing-endpoint BC7 tail requests
(ProjectLeonida#2019, ProjectLeonida#2396) does not apply until tools/build_dstorage_history.py runs
again. Add it to "Settings every platform needs" with the command, the
load line to check and a profile M report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TheGeogeo

Copy link
Copy Markdown
Contributor

Independent review of f390e9b1b17dca7ec44b58082b355221434556ce, merged locally with main 02f71ccfe (clean merge, no conflict).

Machine: Windows 11 Pro 10.0.26300, Python 3.12.4. Docs-only change; no GPU involved.

What ran

  • python -I -m unittest discover -s tests -p "test_docs_*.py": 53 tests, 3 failures on the merge and the same 3 failures on plain main 02f71ccfe (test_docs_cli_flags, test_docs_python_deps (port_ctl.py), test_docs_repo_paths (docs/port_plan.md:164)). The failure output is identical apart from the worktree path, and none of it names docs/running.md. The pull request adds no failure; those three are red on current main without it.
  • git diff --check origin/main...HEAD: clean. python -I scripts/check_no_game_data.py docs/running.md: clean.
  • Checked the new paragraph against the code on main:
    • python -I tools/build_dstorage_history.py --help accepts the documented form (game, --out, --trainer).
    • make_game.py:2659-2662 regenerates <work>/shaders/bcpack/history.bcph with --if-needed in the runtime stage. The fingerprint at tools/build_dstorage_history.py:340-352 hashes the fitter sources, so a fitter change triggers a new fit. A plain cmake or scripts/build_runtime.ps1 build never touches the profile. That matches the text.
    • bcpack_history_train is a runtime target (runtime/CMakeLists.txt:217, a dependency of gta6rt at line 258), so <build>/bcpack_history_train.exe exists next to gta6rt.exe.
    • The "load line" is the history-ok diagnostic at runtime/shims/dstorage.cpp:501-503 ("BC7 endpoint/index fields N/6144 ..."). 4,228 and 4,406 of 6,144 match the 2a491668a commit message and docs/directstorage.md:213. 2a491668a is in main.

What did not run

  • Regenerating the profile and the load line counts: build_dstorage_history.py fits from the retail package's pools (<package>), which this machine does not have. So 4,406 / 4,228, the 11 minutes and the decompression-error counts are not reproduced here. They stay as reported in the linked claim comment, which does hold those numbers.

Note (wording only)

  • docs/running.md:48: "(about 11 minutes here)". On this page "here" reads as measured by the maintainers, but the whole item is marked "reported by others". "(about 11 minutes on that machine)" would avoid the mix-up.

No game data in the change or in this comment.

AI-assisted: Claude Code (Claude Sonnet 5.5)

Status: OK to merge. The text matches the code on main, and the docs tests add no failure. The numbers cannot be checked without the package. Gain: real for anyone who builds the runtime without the make_game.py runtime stage. Not a duplicate: the other open pull requests touching docs/running.md (#2554, #2511, #2417, #2392) change other sections.

@aegish-zagi

Copy link
Copy Markdown
Contributor

#2502 | head f390e9b (merged cleanly with current main adfb382; git merge-tree --write-tree rc=0) | python -I -m unittest discover -s tests -p "test_docs_*.py" | red on main: n/a (docs addition; the gap is absence, not a failing test) | green on PR: 53 tests OK — the same count the PR body reports | Linux, Python 3.12.3 | AI-assisted: yes

Diff audit: +12 lines, one new bullet in docs/running.md ("The DirectStorage predictor profile"), nothing else touched; git diff --check clean and check_no_game_data.py scope is docs-only text with no game data.

Claims checked READ IN CODE against main: commit 2a491668a ("dstorage history: fit packed tails against decoded BCPack siblings") is on main; tools/build_dstorage_history.py exists and takes --trainer; make_game.py (runtime stage, ~line 2659) does regenerate <work>/shaders/bcpack/history.bcph via that tool with --if-needed, which is exactly the gap the bullet warns about for direct cmake / build_runtime.ps1 builds. The added issue links use the old repo name, matching this file's existing convention (7 such references already in running.md).

Honest scope note: the run numbers (4,406 of 6,144 BC7 endpoint fields vs 4,228 before; 7–8 errors/run and the 1,800 s story-load timeout with the old profile vs none with the new one) are the author's measurements on an RTX 4070 SUPER with a local package — Profile Z here has no GPU and no game package, so I did not and cannot re-measure them; they are consistent with the code change they describe.

Verdict: holds up as a docs change — accurate against the code on main, tests green.

@timbot103 timbot103 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static audit of head f390e9b1b against b6bf3aa0b. I inspected the documentation checks and source. No tests, builds, profile generation, or GPU runs. The coverage numbers match the prior measurements recorded in docs/directstorage.md.

  • Major (docs/running.md:47) The --trainer example can fail on Linux after the documented clang-cl/xwin build. That build produces a Windows trainer, and tools/build_dstorage_history.py:262 launches the supplied executable directly. On a Linux host without a PE handler, generation stops before replacing the profile. Please omit --trainer in the Linux example so the script builds a host-native helper. The Windows example can use the prebuilt trainer.
  • Minor (docs/running.md:48) A reader with LEONIDA_DSTORAGE_HISTORY pointing to an older sidecar will continue loading it after regenerating the default file. runtime/shims/dstorage.cpp:467 gives the override precedence. Please tell readers with an override to regenerate the selected file or point the override at the regenerated profile.

AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants