Decoration bakes no longer run the pass over every texture slot first #525
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/525"
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 readmet3xt-lab/foxhound. Originally posted by BrenoMazini on 2026-12-03T01:07:31Z.
What
Before each draw of the title's decoration bake,
State::early_texturesran a pass that uploads textures picked by index. That pass got the bake's whole budget (VICTORY_BAKE_TEXTURES_MS, 1500 ms) and uploaded every slot due, often thousands at once. The bake itself samples only 11-16 slots.This PR caps only that pass, with a new switch,
VICTORY_BAKE_PASS_MS:0: no general pass before a bake (the new default);all: the whole bake budget, as before;The rest of what a bake does is unchanged:
bring_bake_sources), also with the whole budget;The fallback path used when no host list can be made (headless tests) is not changed. The switch is added to the README's table of switches.
Why
In light scenes, where the game otherwise holds 30 fps, these bakes were the frame spikes of play.
Before and after
Setup: Ryzen 7 5700X, RTX 4070 SUPER, Series X profile, 3440x1440, DLSS performance, no frame generation. Two play sessions of my own, one before and one after. They are not replays of the same route, so the after session went through more bakes.
Version tested: a build of my fork based on v0.8.3.3 (main
7dbcdcb, the base of this PR).VICTORY_BAKE_PASS_MS=0, which this PR makes the default.VICTORY_PORT_CONSTANTS=1, which is off by default upstream;VICTORY_HOME=1, which keeps hot runs of the title's big buffer in the card's memory (not upstream);VICTORY_JOURNAL_MIRROR, not upstream).VICTORY_BAKE_PASS_MSunset)failed=0,not_mapped=0A replay-bench run (frames > 100 ms) would confirm this better than my two sessions.
Checks
cargo clippy --workspace --all-targets --locked -- -D warnings: clean.--all-features: clean.cargo test --workspace --locked: all pass.cargo xtask policy: ok.🤖 Generated with Claude Code
Imported from readmet3xt-lab/foxhound. Originally posted by tillo88 on 2026-12-04T00:47:10Z.
@BrenoMazini
Replay-bench measurement: no measurable fps difference on v0.8.3.3; frames > 100 ms at the low end of the release's range
Measured: PR head
4eddbe5merged onto release v0.8.3.3 (same code as main7dbcdcb), with the PR's new default (VICTORY_BAKE_PASS_MSnot set), 2 measured runs (after a warm-up run that is not counted), against 11 runs of v0.8.3.3 without the PR, same route (~6.5 min).Mean fps: release 36.54, PR 36.68 (+0.4%): no measurable difference in frame rate. Frames over 100 ms: 9 in both PR runs, fewer than in 10 of the 11 release runs but inside the release's range (8-32); p99 was slightly below every release run (44.6 vs 44.88-60.01 ms), p95 inside the release's range. With 2 runs this is an observation, not a settled result. The bench does not tell how many bakes this route goes through.
Crashes: none in the PR runs and none in the release runs (no host GPU failure, no device lost).
Config: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB, Windows 11; default
play-foxhound.ps1settings (Series X profile, 1440p, DLSS balanced, no frame generation), fullscreen, no frame cap.Update: measured again on v0.8.3.5 (
5e44415), same PR head4eddbe5, 2 runs against 5 release runs.Mean fps 36.50 (-0.7%): no measurable difference. Frames over 100 ms: 12 and 11, at and just below the low end of the release's 12-17; p95 and p99 inside the release's range. So on v0.8.3.5 the fewer long frames seen on v0.8.3.3 show only weakly. Run 1 logged the layer's once-per-process warning "a queue still stood at a wait at a present: it was not met" (forced present path in
crates/victory-gpu/src/queue/behind.rs); it does not appear in any other log of this bench (about 140 logs since 2 Dec, release and PRs). One occurrence, so it may well be timing; noted in case it matters. No crashes on v0.8.3.5 either.Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.
Imported from readmet3xt-lab/foxhound. Originally posted by BrenoMazini on 2026-12-04T01:02:56Z.
Thank you for measuring this on both releases, and for being careful about what two runs can and can't show.
I agree with your reading: no measurable change in frame rate. I should have said more clearly in the PR that this is what to expect. The change only touches the frames in which a decoration bake runs. In my sessions those were few, mostly in light scenes, where each bake's pass took 154-322 ms and caused the spikes. Over a whole route they barely move the average. Your frames over 100 ms are the closer measure, and as you say, with two runs they are only a hint. On a 9800X3D the pass is probably also much shorter than on my 5700X, which would make it even harder to see.
About the warning "a queue still stood at a wait at a present: it was not met": thank you for noting it. It comes from the submission queue's present path, which this PR doesn't change, so I'd also guess timing, but I can't rule it out from here. For what it's worth, I searched the 27 logs I kept from my runs on 3 December. All of them are from builds that include this PR, with
VICTORY_BAKE_PASS_MS=0andVICTORY_ASYNC_SUBMITon, and the warning appears in none. I'll keep watching for it.If it would help, I can count the bakes and their times in a session from my logs and post them here, so there is at least a number for how often the change applies.
Imported from readmet3xt-lab/foxhound. Originally posted by tillo88 on 2026-12-04T03:40:56Z.
@BrenoMazini
Correction to my note on the "a queue still stood at a wait at a present: it was not met" warning
I wrote above that this warning appeared only in run 1 of this PR and in no other log of the bench. That no longer holds: it has since appeared once in a run without this PR, the warm-up run of release v0.8.3.5 with only
VICTORY_GUARD_PAGES=1andVICTORY_GUARD_PAGES_MOST=4set (no PR merged). So it is not tied to this PR; it shows up rarely on this route with or without it (2 of 168 logs on this bench). The rest of the measurement above is unchanged.Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.