watch: single-pass ask_once, refusal cache, part_runs coalescing, and bounded open wait #177
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!177
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/177/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?
@Androtim on GitHub · 2026-11-30 00:51 UTC · original
Androtim:feat/iter174-watch-hotpath-and-texture-journal→main· +445 −81 · 3 files · 1 commits · closed without mergingSummary
Reduces CPU overhead in the write-watch, page-part coalescing, and texture-refresh journal paths across
watch.rs,texture.rs, andshadow.rs:Skip journal page collection for texture refreshes (
crates/victory-gpu/src/watch.rs,texture.rs):watch::writes_since/writes_withso callers that only need to know whether any page changed since a timestamp avoid allocating and collecting a per-pageVec<(usize, u64)>.Staging::refreshintexture.rstowrites_since.Coalesce contiguous 4 KiB written parts (
crates/victory-gpu/src/watch.rs,shadow.rs):watch::part_runs(parts: u16)and uses it inTracked::takeandshadow::by_partsso adjacent dirty 4 KiB sub-pages merge into single copy runs cleanly.Cache kernel write-watch refusals (
crates/victory-gpu/src/watch.rs):VICTORY_REFUSED_KEEP(on by default;0disables) so ranges refused byGetWriteWatchare cached per thread across a 64-frame epoch (refusals_stand) and invalidated viarefusals_givenwhentitle_memory_allocatedoverlaps the bucketed MiB footprint.Single-pass
ask_once& lock-freeis_kept()fast paths (crates/victory-gpu/src/watch.rs):ask_onceinto one pass usingask_run_all, handling both clustered and lone ranges under oneAsking::hold_all()guard and avoiding duplicate interval coalescing/sorting.is_kept()fast-path checks inask_ahead,ask_ahead_done,ask_once_end, andwrote.QPC-free bounded opening fault wait (
crates/victory-gpu/src/watch.rs):wait_open_done/wait_open_done_withso the default!fault_asks()wait performs a bounded8x64pause spin withoutInstant::now()/ QPC overhead before falling back to cooperative yielding up to 2,000 us.Unit tests (
crates/victory-gpu/src/watch.rs):part_runs,writes_since,single_pass_ask_once,refusals_cache_clears_when_title_memory_allocated, andwait_open_done_withtransitions.Verification
cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy:asset policy: 311 files okcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu watch:: -- --test-threads=1: 56 passedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu shadow:: -- --test-threads=1: passcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu texture:: -- --test-threads=1: passcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: passcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings: passRTX 4060 Ti 8 GB,--release --features diagnostics,DLSS quality,75sin-world offorigin/main,D:\victory-data\cache-minivi-pr165):LowVram):13.0 fpsmedian (76.85 ms,min_fps=5.5,preparing=35.25 ms,copyback=11.8 ms),61,494textures uploaded (final_waiting=1,791),used_max=6399 MB / budget_min=6871 MB(over=0 MB),15/24lit (luma=105.49,edge_energy=7.12,magenta=0.0%),crashes=0.1440p,PlayParity,LowVram):10.8 fpsmedian (92.8 ms,max_draws=14,346),used_max=6608 MB / budget_min=6855 MB(over=0 MB,room_false=88.9%),18/24lit (luma=104.67,edge_energy=7.19,magenta=0.0%),crashes=0.@Androtim on GitHub · 2026-11-30 01:04 UTC · original · edited 2026-11-30 15:02 UTC
Automated triage for the maintainers (not an approval).
Verdict:
needs-rebase· CI (check):passingThis PR no longer merges cleanly into
main.To change the verdict: Rebase onto current
mainand resolve conflicts; CI and triage will run again automatically.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-11-30 08:12 UTC · original
GitHub reports merge conflicts against current \main\ (\98c171). Please rebase on \main\ so we can re-verify on hardware.
@Androtim on GitHub · 2026-12-01 01:38 UTC · original
Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.
Pull request closed