VICTORY_HOT_AB: switches that flip while the title runs, driven by a file, with per-segment frame times (off by default) #1619
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1619
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1619"
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?
@Jesper-Andersson on GitHub · 2026-11-28 22:25 UTC · original
Jesper-Andersson:pr/hot-ab→main· +278 −5 · 6 files · 1 commits · merged 2026-11-29 08:16 UTCFixes: no open issue (this PR is the claim).
Tested in game: I used
VICTORY_HOT_ABin several in-run A/B runs on 2026-11-29, on our fork (not on this PR branch). The log shows the switches flipping as the file says. In one run,victory-nvidia-20261129-013535.log, the file setVICTORY_SUBMIT_DELAY_USto 0, 1000, 1000, 0, 0, 1000, 1000, 0 over eight segments of about 45 s, with the per-segment median and p90 lines. One caveat: a doubled write of the file can give an extrasegment startsline about 1 s after the real one, with the same settings (seen there: segment 2 has 0 frames, and segment 3 starts the same settings 1 s later). A tool that reads the log should key segments by their settings, not by their number.What it changes
Comparing two settings today means two runs, each with its own start, loading and pipeline state, so a few-percent difference drowns in run-to-run noise. This PR adds a diagnostics switch that flips settings inside one run, so an A/B/A/B comparison runs on the same scene and the same process.
VICTORY_HOT_AB=<file>(off by default; unset costs one atomic load per present). The file holdsVICTORY_NAME=valuelines (onlyVICTORY_*names;#comments and blank lines are skipped). Once a second, at a present, the file's modified time is checked. When it changes, the file's lines replace a process-wide override table (a name that leaves the file goes back to the environment) and a new segment begins. An empty file means defaults. The file is only read, never written.crates/victory-gpu/src/hot.rs:hot::over(name)(table only) andhot::var(name)(table, then environment), with unit tests for parsing and the change detection.VICTORY_CARD_WINDOWS_MB(new placements only),VICTORY_POOL_SMALL(new textures only) andVICTORY_CARD_AWAKE(per submission).shadow.rsandpool.rsget one guarded read each; inhost/awake.rsthe mode match moves into a small localofhelper so the read can go through the table (a 17-line refactor, same behaviour when unset). Switches that are read once into a cache, or that change compiled shaders or pipelines, are not hot and are not changed.hot-ab: segment <n> starts: NAME=value ... (frame <f>)andhot-ab: segment <n> (<settings>) frames <k> median <ms> p90 <ms>, written every 5 s and when the next segment begins. The first second of a segment is left out.No behaviour changes while the variable is unset.
How this differs from the existing
VICTORY_AB(crates/victory-gpu/src/ab.rs,VICTORY_AB=<seconds>,<switch>..., diagnostics feature), which already flips switches on a timer and logs per-phase frame times:VICTORY_HOT_ABis driven by a file written from outside (by hand or a script, at any moment), takes arbitrary values per switch rather than on/off phases, works in release builds (not feature-gated), and replaces a whole set of overrides at once. If the maintainer prefers one mechanism,VICTORY_ABcould read the same table instead.How it was tested
VICTORY_names, last value wins, empty values), the mtime-driven reload andvarfalling back to the environment. The tests write only to the system temp folder. A release build passes. In game: see the "Tested in game" paragraph above.cargo testpassed for the crates it touches: yes (victory-gpu: 554 passed, 43 ignored)cargo clippy --no-deps -p victory-gpu: no new warnings. With-D warnings, clippy stops only on lints that are already on main (victory-gpuhost.rs,host/send.rs,pool.rs,resource.rs,streamline.rs,streamline/fsr.rs; victory-shaderemit/lower.rs). The warning set is the same as on main (the open #1527 fixes them).cargo xtask policy: fails on upstream main's owncrates/victory-shader/src/emit/lower.rs(667,523 bytes, over the 640 KiB limit; #1429; the open #1493 and #1527 fix it). Nothing this PR adds trips it, and the pre-commit asset check passed for every file it changes.Checked for overlap
VICTORY_AB(see above), #1155, #825, #1543, #1544, #1491, #1560, #1564host/awake.rs's mode logic. This PR only wraps theVICTORY_CARD_AWAKEread, so a small textual conflict is possible.pool.rs. This PR adds one guarded line in theVICTORY_POOL_SMALLread. Textual overlap at most.This was written with AI assistance (Claude Code).
github-bot referenced this pull request2026-11-30 17:33:54 +00:00