GPU: cut write-watch scans between sparse buffer ranges #4571
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4571"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by yumaste on 2026-11-30T22:55:08Z.
## Change
The default kept write-watch query joined ranges separated by up to 8 MiB. On a submission with sparse buffer reads, Windows then walked many pages in between that the submission did not use. Limit those gaps to 512 KiB and reuse the existing ahead_runs planner. VICTORY_ASK_ONCE_GAP_KB=8192 restores the previous limit for an A/B. The flush-local VICTORY_AHEAD_GAP_KB setting continues to govern its own path.
Requested ranges are still queried and noted under the same locks. If a later read asks about a gap that was not queried, it still uses the normal write-watch path. A new Windows test checks the dirty page in that gap with both limits.
Performance
A/B on Windows with a Core Ultra 9 275HX and RTX 5080 Laptop GPU. Used the host submission bench from #3820 on base
e1251c31plus this patch. The same optimized executable ran three times per limit in alternating order, with two warm-up and twelve measured frames per scenario. The bench sends 30 submissions and 8,973 refreshes per simulated frame. Each number is the median of the three run means.The write-watch phase fell from 11.87 to 3.87 ms in the alias scenario. Every run reported zero stale CPU copies and zero GPU differences after the final refresh. The single-buffer control asked about 0.01 ms per frame in both modes. These results are for synthetic submissions. A gameplay run is still needed for an FPS or frame-pacing estimate.
Validation
Refs #2415. The benchmark from #3820 was applied in a separate worktree for measurement. This PR changes only watch.rs.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:37:39Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed