gpu: lean and hot compares of card copies (VICTORY_CARD_COMPARE_EVERY/HOT, off by default) #618

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

@⁠KhryptorGraphics on GitHub · 2026-11-28 01:55 UTC · original
KhryptorGraphics:port/lean-compare → main · +1970 −35 · 4 files · 1 commits · open

What

Ports the lean and hot compares of card copies from edsuuu's VI-BR-PORT (GPL-3.0). Both are off by default.

  • VICTORY_CARD_COMPARE_EVERY=<D>: a declared range is read whole once in D submissions; in between, only the pieces found changed lately are compared.
  • VICTORY_CARD_COMPARE_HOT=<D>: skipped pieces are owed and covered within D submissions. It is off with VICTORY_RELAY_COPY=1, which the launcher sets, so under the launcher only EVERY acts. The copy-queue follow-up (VI-BR-PORT a35f2fd) is not ported.
  • New pure module host/heat.rs with its unit tests, and an ignored WARP end-to-end test in upcheck.rs.

Source commits: 0033109, 30783d6, 1a1110f, 730b76f, bd9a382, b817ae6, ad8dbec. The source reports 2.4 GB read and 10 ms of card time a frame saved in the opening scene.

Verification

  • Cross-checked for Windows on a Linux machine: cargo check -p victory-gpu --target x86_64-pc-windows-msvc --tests passes with no new warnings.
  • Not run in the game. No frame-rate or stability measurement was taken on this fork; figures quoted are the source fork's own.
  • Clippy and the test suite have not run locally; CI on this pull request is their first run.
  • Reviewed independently against the source commits before pushing.
  • heat.rs's 8 unit tests pass when built alone on Linux.
**@⁠KhryptorGraphics** on GitHub · 2026-11-28 01:55 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/618) `KhryptorGraphics:port/lean-compare` → `main` · +1970 −35 · 4 files · 1 commits · open ## What Ports the lean and hot compares of card copies from edsuuu's VI-BR-PORT (GPL-3.0). Both are **off by default**. - `VICTORY_CARD_COMPARE_EVERY=<D>`: a declared range is read whole once in D submissions; in between, only the pieces found changed lately are compared. - `VICTORY_CARD_COMPARE_HOT=<D>`: skipped pieces are owed and covered within D submissions. It is off with `VICTORY_RELAY_COPY=1`, which the launcher sets, so under the launcher only EVERY acts. The copy-queue follow-up (VI-BR-PORT a35f2fd) is not ported. - New pure module `host/heat.rs` with its unit tests, and an ignored WARP end-to-end test in `upcheck.rs`. Source commits: 0033109, 30783d6, 1a1110f, 730b76f, bd9a382, b817ae6, ad8dbec. The source reports 2.4 GB read and 10 ms of card time a frame saved in the opening scene. ## Verification - Cross-checked for Windows on a Linux machine: `cargo check -p victory-gpu --target x86_64-pc-windows-msvc --tests` passes with no new warnings. - **Not run in the game.** No frame-rate or stability measurement was taken on this fork; figures quoted are the source fork's own. - Clippy and the test suite have not run locally; CI on this pull request is their first run. - Reviewed independently against the source commits before pushing. - `heat.rs`'s 8 unit tests pass when built alone on Linux.
After each submission the card compares every 64 KiB piece of every range
its shaders were declared to write. In the opening scene seven submissions
a frame declare a 182 MB buffer whole: 2.4 GB read and 10 ms of the card a
frame, for 34 pieces found changed.

VICTORY_CARD_COMPARE_EVERY=<D> (the lean compare): a declared range is read
whole once in D submissions; the compares between read only its pieces
found changed in the last VICTORY_CARD_COMPARE_HOT_SPAN submissions (90).
Nothing is owed and no flight waits: a write to a cold piece reaches title
memory with the range's next whole read. The pieces a compare left that a
send is about to hash again are compared first, in a list of their own
ahead of the sends (VICTORY_CARD_COMPARE_EVERY_AHEAD=0 leaves them out, and
shaders' writes there may then never land). Needs the relay; works with
VICTORY_RELAY_COPY=1.

VICTORY_CARD_COMPARE_HOT=<D>: the pieces a compare skips are owed, and a
cover compares them within D submissions, ahead of any send that hashes
them again; a flight that owes pieces is held from landing until its cover
has run (VICTORY_CARD_COMPARE_HOT_HOLD=0: not held). The landing thread asks
for the cover fence until it exists, and covers everything itself when the
line has run or a thread waits for landings. Needs the relay, and is off
with VICTORY_RELAY_COPY=1, which the launcher sets: the copy-queue follow-up
(VI-BR-PORT a35f2fd) is not taken, so under the launcher only EVERY acts.

host/heat.rs holds both books (pure) and their tests, among them models of
the relay with and without the compares ahead of sends. An ignored WARP
test in upcheck checks the lean compare end to end.

Left out: VI-BR-PORT's per-copy compare statistics and card timestamps
(compared_of, found_of, CardStamps), which this fork does not have;
a35f2fd (HOT with the copy queue) and its WARP test; da52606 (an
indirect.rs WARP test of the same).

Ported from VI-BR-PORT (edsuuu): 0033109, 30783d6, 1a1110f, 730b76f,
bd9a382, b817ae6, ad8dbec.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:57:33 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-618'
git switch 'github-bot/gh-618'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-618'
git switch 'github-bot/gh-618'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-618'
git switch 'main'
git merge --squash 'github-bot/gh-618'
git switch 'main'
git merge --ff-only 'github-bot/gh-618'
git switch 'main'
git merge 'github-bot/gh-618'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!618
No description provided.