GPU: VICTORY_COLD_SKIP=1: refreshes pass over 2 MiB chunks with no write since (off by default) #1358
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1358
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1358"
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?
@TG0000 on GitHub · 2026-11-26 18:08 UTC · original
TG0000:pr/cold-skip→main· +580 −72 · 4 files · 1 commits · openAI-assisted (Claude). Off by default. This branch has not been run in the game: the numbers below come from an earlier version of the change on a local stack. Reports from other GPUs and CPUs are very welcome.
What
A refresh of a host copy walks every 64 KiB page of its range and compares the page's last copy with its last noted write (
Shadow::copy_stale). A large copy that many submissions refresh is walked whole each time, mostly to find nothing.With
VICTORY_COLD_SKIP=1:Marks are read under the same lock as the written pages. A page still stale after its copy (taken in part, or numbered after a standing asking) keeps its chunk walked, so the same pages are copied as without the switch.
VICTORY_COLD_SKIP=altturns it on and off every 20 s. A log line with the frame-rate line says how many pages were passed over. With the switch unset no marks are kept and every page is looked at as before.Measured
AMD Radeon RX 6800 16 GB (RDNA2), Adrenalin 26.11.2, Ryzen 9 5900X, Windows 11, 1440p internal. One 240 s launch alternating the switch, 43 paired blocks, on a local stack with many other switches on (older base than this branch).
VICTORY_REFRESH_CHECK=1: no "stale after its refresh" line. That check samples the first 256 bytes of each 64 KiB block, so it is evidence, not proof.Difference from the measured version: while porting I found that it could remember a chunk holding a page that was still stale (written after a standing asking), and so not take that page again as the walk without the switch does. This PR keeps such a chunk walked; there is a test for it. The fixed version has not been measured.
Checks (on this branch, rebased on
52ac4ec0)Built on macOS (Apple M3 Pro), cross-targeting Windows where noted:
cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features, targetx86_64-pc-windows-msvc: clean.victory-gpuandvictory-shaderWindows test binaries build. They were not run.cargo testforvictory-core,victory-formats,victory-pipeline,victory-shader: pass.cold_skip.rs(standard library only): 9 of 9 tests pass withrustc --test, including a randomized comparison of the copied runs with and without the skip, with standing askings and partly held pages. These tests model the walk; they do not driveShadow::copy_staleitself.cargo xtask policyreports two files over the size limit (host.rs,lower.rs). Both already are onmain, and this PR touches neither.Related
VICTORY_LIGHT_REFRESH=1already returns early for a range with nothing new. This works per 2 MiB chunk, so it also helps when part of a range changed, and it does not need that switch. The two together are untested, as isVICTORY_DIRTY_4K.copy_stale.To try it
VICTORY_COLD_SKIP=altand compare the two phases; once,VICTORY_COLD_SKIP=1 VICTORY_REFRESH_CHECK=1and look for "stale after its refresh". Please report GPU, CPU, driver, the "passed over" percentage and both phases' preparing and frame times.🤖 Generated with Claude Code
@Filip722 on GitHub · 2026-11-26 23:47 UTC · original
Tested
6be3efbdintegrated on main4c604661on Bazzite, GE-Proton11-14, vkd3d-proton 3.2.0 and an RTX 5060 Laptop 8 GB. I made two independent copies of the same Series S checkpoint, prefix and cache seed. Both replays used the same executable, indexed Wine server and 50% internal scale. OnlyVICTORY_COLD_SKIPchanged.Both reached the matched cell camera at about 209 s. The enabled arm skipped a median 76.6% of page checks over 50 samples in the scoring window. Forward-copy timing moved from 58.0 to 55.8 ms/frame at the median, and reported forward bytes were 164.3 and 159.3 MB/frame. This is one replay per mode. Streaming activity varied, and an earlier 50% run without the PR gave 5.86 FPS, so the test does not establish a net gain over main.
The nine cold-skip regressions passed on the Windows-target binary under Proton with the feature off and on. The stale-page regression passed. The wider watch filter matched the control exactly at 17 passes, two inherited Wine capability failures and one ignored. The two failures were the Event Log subscription stub and the missing placeholder query.
Assisted by Codex (GPT-6.2-Sol High).
@TG0000 on GitHub · 2026-11-27 00:01 UTC · original
CI status: the only failing check is
repository_passes_policy. It fails on two upstream files over the 512 KiB limit,crates/victory-gpu/src/host.rs(534,239 bytes) andcrates/victory-shader/src/emit/lower.rs(546,915 bytes). This PR changes neither file, andmainfails the same check.#1357 fixes this by moving those test modules into their own files.
Depends on: #1357
I'll re-run CI (or rebase) once #1357 lands.
(AI-assisted comment.)
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.