Skip to content

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

Draft
Marukooh wants to merge 1 commit into
fxceless:mainfrom
Marukooh:relay-reuse-merge-scratch
Draft

Marukooh wants to merge 1 commit into
fxceless:mainfrom
Marukooh:relay-reuse-merge-scratch

Conversation

@Marukooh

Copy link
Copy Markdown

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.

@BitWuehler

Copy link
Copy Markdown

In-world verification on Linux/Proton (CachyOS, GE-Proton11-14 + vkd3d-proton, RTX 5080 16 GB, Series X profile), with b44bf59 merged onto 52ac4ec across 6 Prologue world sessions (VICTORY_RELAY=2, VICTORY_LATE_WAIT=3, VICTORY_MERGE_RUNS=4096):

  • Sustained in-world relay merge load: 131–550 pages looked at, 48,179–1,275,194 changed runs, 2.34–5.27 MB/frame merged under flights' shader writes.
  • 0 merge give-ups across all runs (0 unwatched copy memory, 0 missing write-tracking answers, 0 exceeding VICTORY_MERGE_RUNS, 0 missing PC snapshots).
  • Clean runs and exits (rc=0) with no relay corruption or stability regressions.

(AI-assisted testing, log extraction, and summary.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants