Pack each scatter offset and word in one upload store #3039

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

@⁠Brazzo978 on GitHub · 2026-11-29 19:42 UTC · original
Brazzo978:perf/pack-scatter-words → main · +42 −14 · 1 files · 1 commits · open

What it changes

Write each scatter upload's offset and value with a single 64-bit store. The low dword still holds the byte offset, the high dword still holds the value, and the shader continues reading the pair with Load2. The short-run predicate and upload buffer size are unchanged.

How it was tested

I tested 20,000 synthetic mixed ranges producing 134,655 scatter words on a Ryzen 7 5800X3D running Windows 10.

Destination Run Base Patch
Write-combined 1 219.90 µs 166.40 µs
Write-combined 2 235.60 µs 214.65 µs
Cached 1 199.23 µs 192.98 µs
Cached 2 207.28 µs 175.73 µs

The focused test checks pair layout and order, unaligned addresses, the 256-byte cutoff, skipped ranges and sentinels outside the output. The benchmark measures the CPU packing step. Gameplay frame time for this patch has not been measured.

The focused victory-gpu crate test passed on Windows MSVC.

Checked for overlap

  • Searched open PRs for scatter packing and the upload path. #2587 targets allocation reuse in send::take; this patch targets the pair stores.
**@⁠Brazzo978** on GitHub · 2026-11-29 19:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3039) `Brazzo978:perf/pack-scatter-words` → `main` · +42 −14 · 1 files · 1 commits · open ## What it changes Write each scatter upload's offset and value with a single 64-bit store. The low dword still holds the byte offset, the high dword still holds the value, and the shader continues reading the pair with `Load2`. The short-run predicate and upload buffer size are unchanged. ## How it was tested I tested 20,000 synthetic mixed ranges producing 134,655 scatter words on a Ryzen 7 5800X3D running Windows 10. | Destination | Run | Base | Patch | | --- | ---: | ---: | ---: | | Write-combined | 1 | 219.90 µs | 166.40 µs | | Write-combined | 2 | 235.60 µs | 214.65 µs | | Cached | 1 | 199.23 µs | 192.98 µs | | Cached | 2 | 207.28 µs | 175.73 µs | The focused test checks pair layout and order, unaligned addresses, the 256-byte cutoff, skipped ranges and sentinels outside the output. The benchmark measures the CPU packing step. Gameplay frame time for this patch has not been measured. The focused `victory-gpu` crate test passed on Windows MSVC. ## Checked for overlap - [x] Searched open PRs for scatter packing and the upload path. #2587 targets allocation reuse in `send::take`; this patch targets the pair stores.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 19:47:10 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/send.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/3039/head:github-bot/gh-3039'
git switch 'github-bot/gh-3039'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3039'
git switch 'github-bot/gh-3039'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3039'
git switch 'github-bot/gh-3039'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3039'
git switch 'main'
git merge --squash 'github-bot/gh-3039'
git switch 'main'
git merge --ff-only 'github-bot/gh-3039'
git switch 'main'
git merge 'github-bot/gh-3039'
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!3039
No description provided.