GPU: avoid re-uploading card data after a waited fetch #496
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!496
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-496"
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?
@ryotdev on GitHub · 2026-11-25 01:37 UTC · original
ryotdev:codex/skip-card-echo→main· +109 −43 · 2 files · 1 commits · openA waited fetch can contain writes made entirely by the GPU. The three-way merge already copies those bytes into title memory and the staging buffer. The next submission used to upload that same range back to the GPU before refreshing its comparison hash.
Track ranges that need an upload separately from ranges that only need a fresh hash. A surviving CPU-only edit still queues the merged span for upload. Earlier pending uploads also keep their place. Both sets of ranges participate in the next 64 KiB piece-hash refresh. Relay retains its existing upload behavior because a later submission can write to the card after the fetch. On current main this optimization applies with
VICTORY_RELAY=0. The default relay path receives no bandwidth claim.Measurement. Two 90-second runs from the same checkpoint on a desktop RTX 5070 (Windows 11, driver 610.88), using one instrumented executable with the change toggled, matched inputs, and independent copies of the same starting cache. The playback build was based on
9ba79eeand used waited fetches. In the last 30 seconds, median upload traffic fell from 169.5 to 99.4 MB/frame and recorded upload ranges from 1,203 to 285/frame. The changed path directly accounted for 58.1 MB/frame in the enabled run. Streaming varied between runs, so this comparison does not establish an FPS improvement.Verification on main
c96b4f2. Added synthetic tests for byte ownership and overlapping hash-only/upload ranges. A separate Windows WARP check failed on the parent for an unnecessary upload and passed here, including a surviving CPU-only edit and the relay-2 fallback. The full diagnostic GPU suite returned 121 passed, one ignored, and one depth-bounds failure also reproduced on the parent. All-feature GPU Clippy and the repository asset policy passed. Default Clippy reports an unusedplaced_filler_twinsin unchanged code.An additional cross-built Windows all-feature workspace run returned 503 passed, 12 failed and eight ignored. Seven tests depended on build-host paths unavailable to the Windows process, four failed in the unchanged shader suite on WARP, and one was the parent-reproduced depth-bounds case above. The portable core, pipeline and policy tests passed 19/19 when run on their build host.
AI-assisted.
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.Merge
Merge the changes and update on Forgejo.