D3D12.X: make the write-watch merge gap configurable #1629
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1629
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1629/head"
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?
@MitchellBrovarnik on GitHub · 2026-11-24 18:24 UTC · original
perf/write-watch-gap→main· +239 −8 · 5 files · 1 commits · closed without mergingAdds opt-in control of the gap used to merge write-watch ranges before GPU submissions. Keeps the 64 MiB default from #551; smaller gaps can avoid scanning unused address space on some fragmented layouts. Related to #582, but independent of the cold-page approach. This is a performance experiment, not a crash or rendering fix.
What is in it
Tested
b7aa9f3, Windows 25H2 build 26200.9711, RTX 5080, driver 596.49, Ryzen 7 9800X3D, 64 GB RAM. Release workspace build succeeded. Full-suite counts and exact Rust version for the final revision pending.Layout Write-watch 64 / 8 (ms) Fixture elapsed 64 / 8 (ms)
packed 136 / 135 738 / 746
gap3 379 / 379 996 / 973
gap9 1025 / 686 1682 / 1294
gap15 999 / 468 1686 / 1184
gap79 94 / 95 705 / 723
Write-watch time fell 33.1% and 53.2% for the 9 and 15 MiB gap layouts respectively. Packed and widely spaced layouts had small elapsed-time slowdowns; three repeats are insufficient to rule out small regressions. Results apply to these source-built fixtures only.
Regression run
main: pending required clean-commit smoke run on a supported title owned by the tester.
PR: pending same-title, same-duration clean-commit smoke run with the opt-in setting. Not merge-ready until both blocks and full-suite results are supplied.
Not tested
AI use
@pickles976 on GitHub · 2026-11-24 18:28 UTC · original
Approve — the two non-obvious parts are both right: ①
OnceLockbecause the merged ranges are cached: re-reading env mid-run would let a changed gap silently contradict already-cached merged ranges (a knob that can lie to the cache is worse than no knob; the doc comment states the reason, which is what keeps it from being "optimized" into a lazy read later); ② invalid or out-of-range input falls back to the measured 64 MiB default and the log line prints requested-vs-applied — so a user setting128sees "64 MiB (requested \"128\")" instead of silent surprise. Range clamp 1–64 keeps it from being a way to turn merging off (gap=0 ⇒ pathological unmerged scan) — right for a tuning knob; if someone later wants "disable merging" as a diagnostic, that deserves its own explicit value, not a clamp edge. Cross-link worth recording: this is the sibling knob toXCL_COHERENT_MB— one tunes how much address space is watched, the other how much is resident; the fresh RDNA2 report (sparse-window updates 1000× at default coherent MB, fixed at 512) is exactly the fragmented-layout case this gap tuning targets, so the two knobs together give the cohort a clean 2×2 for scan-cost A/B. Nice to see a knob land with its measurement story attached.@DavidM1911 on GitHub · 2026-11-24 20:46 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Pull request closed