GPU: reuse the relay merge scratch and skip fully superseded reads #1350

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

@⁠Marukooh on GitHub · 2026-11-26 17:33 UTC · original
Marukooh:relay-reuse-merge-scratch → main · +28 −11 · 1 files · 1 commits · draft

The GPU-resident buffer relay cleared and initialized its temporary title buffer for each divergent piece. This reuses the initialized prefix within a landing. A successful title read fills the prefix, and on a failed read the scratch is used only to update the CPU shadow. When later or pending uploads cover the entire divergent span, the merge skips the title read.

The change is in card_merge_relay, adjacent to the work in #786. #240 applies a similar idea to scratch in copy_back_with.

Built on e4245f3 for Windows GNU with diagnostics. Ran the extended a_title_byte_sent_after_a_flight_survives_its_slot regression under Proton on RTX 5070 Ti. It exercises reuse of a prefilled larger scratch buffer, preserves a title byte uploaded after an earlier flight, and checks that a fully covered span leaves title memory and scratch untouched.

The earlier Series X prototype showed mixed frame-time improvements. Copy-back byte volume also varied, so a matched in-game comparison on this base is pending. AI-assisted. This patch and its test use synthetic data.

**@⁠Marukooh** on GitHub · 2026-11-26 17:33 UTC · [original](https://github.com/fxceless/victory-fork/pull/1350) `Marukooh:relay-reuse-merge-scratch` → `main` · +28 −11 · 1 files · 1 commits · draft The GPU-resident buffer relay cleared and initialized its temporary title buffer for each divergent piece. This reuses the initialized prefix within a landing. A successful title read fills the prefix, and on a failed read the scratch is used only to update the CPU shadow. When later or pending uploads cover the entire divergent span, the merge skips the title read. The change is in `card_merge_relay`, adjacent to the work in #786. #240 applies a similar idea to scratch in `copy_back_with`. Built on e4245f3 for Windows GNU with diagnostics. Ran the extended `a_title_byte_sent_after_a_flight_survives_its_slot` regression under Proton on RTX 5070 Ti. It exercises reuse of a prefilled larger scratch buffer, preserves a title byte uploaded after an earlier flight, and checks that a fully covered span leaves title memory and scratch untouched. The earlier Series X prototype showed mixed frame-time improvements. Copy-back byte volume also varied, so a matched in-game comparison on this base is pending. AI-assisted. This patch and its test use synthetic data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 17:37:52 +00:00
This pull request can be merged automatically.
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/1350/head:github-bot/gh-1350'
git switch 'github-bot/gh-1350'

Merge

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