Warm-up: the run's log names the view heap's null slot, the number VICTORY_VIEW_LIMIT wants #1416

Open
github-bot wants to merge 1 commit from github-bot/gh-1416 into main AGit
Owner

@⁠Granite900 on GitHub · 2026-11-27 00:17 UTC · original
Granite900:fix/warm-view-limit → main · +9 −4 · 2 files · 1 commits · open

translate --warm's help says to set VICTORY_VIEW_LIMIT to "what the run's log says of the host". The log line host view heaps hold N views prints the heap's size, but the run gives the translator views - 1 (the null slot), and that number is part of the shader cache key (translation_fingerprint). A warm-up done as the help says writes entries the game never finds.

What happened here (RX 9070 XT, 2,097,152 views, base 4c60466):

  • VICTORY_VIEW_LIMIT=2097152, as the log printed: 25,743 shaders translated, 0 found in the cache, although a game run had just cached about 3,100 of them.
  • VICTORY_VIEW_LIMIT=2097151: 3,097 found (that run's entries), 22,646 translated. The game then took 3,099 shaders from the cache and translated 2.

Change: the log line also names the null slot (null_slot=2097151), and --warm's help says to use that value, not views. The value the translator gets is unchanged.

Checks: cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings is clean; cargo test -p victory-gpu -- --test-threads=1 gives 233 passed with one test skipped (below); cargo test -p victory passes. I have not seen the new log line in a game run yet.

Failing on main as of b1d777a, without this change (for whoever looks at CI):

  • clippy -D warnings: 6 errors in crates/victory-shader/src/emit/valu_tests.rs (lines 608–617: negated comparisons on floats, two simplifiable expressions).
  • tiles::tests::card_wrote_failure_does_not_poison_card_mask ends the victory-gpu test process with an access violation (0xc0000005) on this machine.
  • xtask repository_passes_policy: host.rs (549,040 bytes) and lower.rs (544,889 bytes) are over the 512 KiB limit, so the pre-commit hook also refuses any commit that touches them.

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

**@⁠Granite900** on GitHub · 2026-11-27 00:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/1416) `Granite900:fix/warm-view-limit` → `main` · +9 −4 · 2 files · 1 commits · open `translate --warm`'s help says to set `VICTORY_VIEW_LIMIT` to "what the run's log says of the host". The log line `host view heaps hold N views` prints the heap's size, but the run gives the translator `views - 1` (the null slot), and that number is part of the shader cache key (`translation_fingerprint`). A warm-up done as the help says writes entries the game never finds. **What happened here** (RX 9070 XT, 2,097,152 views, base `4c60466`): - `VICTORY_VIEW_LIMIT=2097152`, as the log printed: 25,743 shaders translated, **0 found in the cache**, although a game run had just cached about 3,100 of them. - `VICTORY_VIEW_LIMIT=2097151`: **3,097 found** (that run's entries), 22,646 translated. The game then took 3,099 shaders from the cache and translated 2. **Change:** the log line also names the null slot (`null_slot=2097151`), and `--warm`'s help says to use that value, not `views`. The value the translator gets is unchanged. **Checks:** `cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings` is clean; `cargo test -p victory-gpu -- --test-threads=1` gives 233 passed with one test skipped (below); `cargo test -p victory` passes. I have not seen the new log line in a game run yet. **Failing on `main` as of `b1d777a`, without this change** (for whoever looks at CI): - clippy `-D warnings`: 6 errors in `crates/victory-shader/src/emit/valu_tests.rs` (lines 608–617: negated comparisons on floats, two simplifiable expressions). - `tiles::tests::card_wrote_failure_does_not_poison_card_mask` ends the `victory-gpu` test process with an access violation (0xc0000005) on this machine. - `xtask` `repository_passes_policy`: `host.rs` (549,040 bytes) and `lower.rs` (544,889 bytes) are over the 512 KiB limit, so the pre-commit hook also refuses any commit that touches them. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`translate --warm`'s help said to set VICTORY_VIEW_LIMIT to what the run's
log says of the host, but the log printed the heap's size (`views`) and the
run gives the translator `views - 1`, which is in the cache key. A warm-up
with the logged number made a cache the run never hit: 25,743 shaders
translated, 0 found of the ~3,100 a run had just cached (RX 9070 XT,
2,097,152 views). With 2,097,151 the same warm-up found 3,097.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:03:55 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1416/head:github-bot/gh-1416'
git switch 'github-bot/gh-1416'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1416'
git switch 'github-bot/gh-1416'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1416'
git switch 'github-bot/gh-1416'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1416'
git switch 'main'
git merge --squash 'github-bot/gh-1416'
git switch 'main'
git merge --ff-only 'github-bot/gh-1416'
git switch 'main'
git merge 'github-bot/gh-1416'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.