Skip to content

GPU: skip unchanged host copies and compact armed page ranges - #1

Draft
Naruto334692 wants to merge 5 commits into
mainfrom
gpu/unchanged-copy-fast-path-armed-runs
Draft

Naruto334692 wants to merge 5 commits into
mainfrom
gpu/unchanged-copy-fast-path-armed-runs

Conversation

@Naruto334692

@Naruto334692 Naruto334692 commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Combines the upstream copy-preparation and compact-arming optimizations on an isolated branch:

  • Skip refresh batch work for tracked shadows with no changed pages, using an atomic page count.
  • Store shader-armed ranges as coalesced page intervals with explicit unarmed-page exceptions. The interval lookup is binary-search based and adjacent/overlapping runs merge.

Regression coverage

  • watch::tests::a_tracker_says_when_nothing_changed
  • watch::tests::armed_ranges_keep_their_pages_bytes_from_before_the_first_write
  • watch::tests::adjacent_and_overlapping_armed_runs_coalesce — 200 adjacent ranges, reverse insertion, nesting, overlap, disjoint, unarm/rearm and empty ranges.
  • host::batch::a_copy_nothing_wrote_is_not_asked_for

Validation

Windows GitHub Actions on commit ebd5d5f passed:

  • Clippy, workspace/all targets
  • Clippy with all features (diagnostics)
  • cargo test --workspace --locked

The changes have not been tested in a real GTA VI world run. Synthetic performance results from the upstream PRs are not a claim of improved in-game FPS.

Scope

Only crates/victory-gpu/src/{host.rs,shadow.rs,watch.rs} are changed. No game files or proprietary assets are included. The fork's main remains unchanged.

Combined integration check

The combined tree with PR #3 also passed Windows CI in integration PR #4, run 45600710813: both workspace Clippy passes and cargo test --workspace --locked succeeded with 0 failures. This is CI validation only, not a real GTA VI hardware run or an FPS claim.

Copy link
Copy Markdown
Owner Author

Integration validation (Windows)

The combined tree with the unchanged-copy fast path and bindless heap UAV copy-back passed GitHub Actions run 45600710813 on commit 3d77d15e854d720c467aab308a8158b7bf2530b0.

  • cargo clippy --workspace --all-targets --locked -- -D warnings: passed.
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed.
  • cargo test --workspace --locked: passed; every reported suite had 0 failures, including repository_passes_policy.

This verifies the two PR changes together on the Windows CI runner. It is not a real GTA VI hardware run and does not establish an FPS gain.

Copy link
Copy Markdown
Owner Author

Synthetic WARP A/B result

The benchmark control run 45603378829 (PR #3 without PR #1) measured median preparing 306.2 ms and copy-back 162.1 ms. The combined PR #1 + PR #3 run 45602186239 measured 79.3 ms preparing and 146.4 ms copy-back.

That is about 74% lower synthetic CPU preparing time and 9.7% lower copy-back in these runs. Both used the same WARP benchmark/workload on Windows hosted runner jobs, not the same physical machine. This does not show game FPS or discrete-GPU performance; the absolute values should not be compared to title frame time.

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.

1 participant