victory-gpu: overlap write-watch ask_once, parallel preludes, and Batch write dedup #309
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!309
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-309"
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-12-02 08:34 UTC · original
Androtim:perf/async-ask-once-and-parallel-preludes→main· +604 −212 · 3 files · 1 commits · merged 2026-12-02 08:49 UTCSummary
Addresses Issue #276 Rank 2 (parallelizing CPU submission
preparingwork on the main queue thread):crates/victory-gpu/src/watch.rs,host.rs):victory-askworker (begin_ask_once,AskedOnce,ask_once_extend) default-on (VICTORY_ASK_OVERLAP=0kill-switch).ask_onceonruns'sasked_aheadspans beforecard_steps, overlaps OSGetWriteWatchcost with command-planning/heaps work, then incrementally merges any lateown.list()Step::Refreshranges viaBatch::extend_copy_spans+watch::ask_once_extendwithout re-scanningrunsor duplicatingask_once.HostListprelude recording (crates/victory-gpu/src/host/prelude.rs,host.rs):host/prelude.rs(PreludePlan,HostList::plan_prelude,HostList::record_prelude,record_all) default-on (VICTORY_PARALLEL_PRELUDES=0kill-switch).HostListcommand list preludes in parallel acrossland::each_underworkers.Batchwrite deduplication & earlyflush_one(crates/victory-gpu/src/host.rs):AheadRanges::covering_spanandBatch::{last_ahead, seen_writes, declared_places, declared}withBatch::note_write/take_declaredto skip redundant covering-range lookups and deduplicate contiguous GPU writes during step iteration.host.rsbelow the 655,360-bytextask policyfile limit (654,043bytes).Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy: PASS (asset policy: 321 files ok,host.rs654,043bytes <655,360limit)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib --locked -- parse_ask_overlap begin_ask_once ahead_ranges_covering_span parse_parallel_preludes: PASS (4/4 passed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warnings: PASScargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics --locked -- -D warnings: PASS--releasebuild +objdump -p: standard Windows DLLs only (KERNEL32.dll,d3d12.dll,dxgi.dll, etc.)Paired Same-Path Plain-
--releaseA/B (D:\victory-build\minivi\release\victory.exe, 90s world runs)Measured from the identical executable path to eliminate NVIDIA
DXCacheper-path cold shader compilation skew (main79e8487vs PR branch):main(79e8487)-PlayParity -Res 1440 -DlssMode quality)preparing(report median)28.0 ms24.8 ms-3.2 ms(-11.4%)preparing_core_msavg / med31.96/35.70 ms30.07/34.70 ms-1.89/-1.00 msasking_watch_msavg / med3.85/4.80 ms2.48/3.00 ms-35.6%/-37.5%thin_msavg506.94 ms476.55 ms-30.39 ms14.6 fps(68.6 ms)14.6 fps(68.5 ms)-0.1 msmapped()stall rate12.1 ms/s7.28 ms/s-4.82 ms/s-PlayParity -Res 4k -DlssMode quality)preparing(report median)20.0 ms17.5 ms-2.5 ms(-12.5%)preparing_core_msavg / med28.66/31.50 ms26.32/28.40 ms-2.34/-3.10 ms(-9.8%)asking_watch_msavg / med2.88/3.50 ms1.91/2.10 ms-33.7%/-40.0%thin_msavg / med533.26/647.20 ms519.49/622.60 ms-13.77/-24.60 ms6.7 fps(149.8 ms)6.4 fps(155.2 ms)112.05vs122.2 ms)mapped()stalls in all 4 runs.--features diagnosticsVisual Verification (diag-pr-askprelude-1440p-90s, 1440p)Reached real 3D world:world_windows=20,max_draws=12380Zero crashes / DRED / panics:crashes=0,no_host_texture_errors=0,untranslated=6VRAM within card budget:used_max=6303 MB,budget_min=6686 MB,over=0 MB,room_false=0.0%Texture streaming healthy:final_waiting=2106,max_waiting=35556Residency stalls bounded:mapped_rate=11.07 ms/world_sec(4000calls,364.2 mstotal, max9.8 ms)Visual lighting & texture detail:pngs=24,lit=21/24,luma=99.76,near_black=0.06%,edge_energy=7.85,magenta=0.0%frame-2049.png,frame-2057.png, andframe-2073.pngdirectly — full world lighting, textures, reflections, and crisp HUD overlay with zero artifacts.@Androtim on GitHub · 2026-12-02 08:49 UTC · original
Autonomous architectural audit PASSED on
c2dc61bd(CI GREEN):VICTORY_ASK_OVERLAP=0andVICTORY_PARALLEL_PRELUDES=0kill-switches only):victory-askworker safely joins beforeask_oncere-query whensettled_before_prepruns and incrementally merges lateown.list()ranges viaextend_copy_spans+ask_once_extend.HostList::plan_preludepreserves exact sequentialtexture.state/twin.behindordering beforeprelude::record_allparallelizes D3D12 command recording only across strictly distinctHostListpointers.Batch::note_write/take_declaredmatchesdeclared_writes(runs)semantics while eliminating duplicateShadow::writinglocks and keepinghost.rsbelow thextask policysize cap.--releaseA/B (0crashes /0DRED):preparing28.0 -> 24.8 ms(-3.2 ms/-11.4%),asking_watch_ms-35.6% / -37.5%,thin_ms-30.39 ms,mapped()12.1 -> 7.28 ms/s, median FPS14.6 -> 14.6 fps(68.6 -> 68.5 ms).preparing20.0 -> 17.5 ms(-2.5 ms/-12.5%),preparing_core_ms-2.34 / -3.10 ms(-9.8%),asking_watch_ms-33.7% / -40.0%,thin_ms-13.77 / -24.60 ms.1440p90s): All 6 gates PASS (over=0 MB,room_false=0.0%,final_waiting=2,106,untranslated=6).Squash-merging into
main.