perf(gpu): pin hot BVH fault pages, extend Quiet copyback skip, FastMap draw tables, and cut card.check submits #399
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/399"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T16:25:02Z.
Summary
Scouts and ports Windows/D3D12-applicable performance, 8 GB VRAM residency, and GPU stability wins from GPL-3.0 upstream repositories
lobomfz/VIctory-xmemandReTerryDavis/ReVIctoryontoAndrotim/MiniVI:Hot BVH fault-page strike pinning (
crates/victory-gpu/src/memory.rs) — Adapted fromlobomfz/VIctory-xmemPR #255 (SETTLED = 4, GPL-3.0) for Windows D3D12:VIctory-xmemPR #255 operates onum/residency.rs(Linux/vkd3d-proton Vulkan unified-memory page migration, reportingcopy_ms6.3 -> 1.0 ms/frameand>10 mswindows6/30 -> 0). Windows-native D3D12MiniVIhas noum/residency.rs; its dynamic 64 KiB page thrash path under 8 GB VRAM limits (fault_pages_for= 256 MiB on 8 GB GPUs) isMemory'sFaultQueues.FAULT_SETTLED = 4persistent prompt eviction/re-fault (FAULT_SOON) strike tracking (FaultQueues), routing 4-strike hot pages topinned_ordersogive_back()evicts cold unpinned pages first while falling back safely topinned_orderonly when cold candidates are exhausted (and preservingFAULT_YOUNGsafety).adopt, permanent unmap (look_againdecommit /refused/ packed release), and2 * FAULT_YOUNGgc()expiry so recycled virtual addresses start fresh.pagesagainst the per-frameFAULTS = 128cap and reports pinned page counts.Non-carded
Quietcopyback & snapshot suppression (crates/victory-gpu/src/shadow.rs) — 8 GB VRAM copyback reduction:Quiet(QUIET_AFTER = 64consecutive zero-change compares, periodicAUDIT_EVERY = 32audit, immediate CPU wake) tocard.is_none()buffers inShadow::gpu_writesandShadow::note_quiet_compared_address.CARD_REFUSEDfallback) and for< 1 MiBUAV buffers, host-visible buffers now skip redundant per-frameShadow::writingsnapshots andcopy_back_with/relayCPU diff scans once settled at zero changes.FastMap(AddressHash) for per-draw root & sweep tables (crates/victory-gpu/src/draw.rs) — Ported fromlobomfz/VIctory-xmemPR #298 (GPL-3.0):HashMapwithFastMap<K, V>(AddressHash) onroot_srv_slots,root_uav_slots, andBufferSweep::unwatched/next_unwatched, matching neighboringfresh_tables/fresh_longest.card.checkExecuteCommandListsisolation (crates/victory-gpu/src/host.rs,crates/victory-gpu/src/host/check_cut.rs) — Ported fromReTerryDavis/ReVIctoryPR #19 (GPL-3.0):ExecuteCommandListsbeforecard.checkacrosssend_publishedand bothsubmit(lateand synchronous non-timing) paths so implicitCOPY_DESTpromotions decay toCOMMONbeforecard.checkbinds them as root SRVs (D3D12 debug layer ID 538 / RDNA2 TDR).Upstream Attribution (GPL-3.0)
lobomfz/VIctory-xmem(verifiedgpl-3.0):39a67fad234b14aa3c3c509caa749a066af528e0) — 4-strike hot page pinning (SETTLED = 4)2e9fb291bcffc18a7233d001031d1ce778c3ea00) —AddressHashFastMapon per-draw root tablesReTerryDavis/ReVIctory(verifiedgpl-3.0):1d062cee27746206d62ef2b551b65cecd8bdc409) —ExecuteCommandListscut beforecard.checkInspected Upstream Targets Skipped (with Rationale)
lobomfz/VIctory-xmemPRs #263 (presets), #273 (Linux hidraw DualSense + WASAPI), #275 (Vulkan UM APU + LSFG bridge), #277 (Linuxrun.shGTT/PSI guard): Linux/Wine/launcher-only or non-D3D12.lobomfz/VIctory-xmemPR #294 (xmaVLC lookup) &ReVIctoryPR #22 (Snapshotpressure trim /AheadRanges): already present onAndrotim/MiniVImain(xma.rs,shadow.rs,host.rs).lobomfz/VIctory-xmemPR #329 (VICTORY_RECORD_PLACES/RANGES): applies to cuckoorecords_tableshader lowering not used byMiniVI.lobomfz/VIctory-xmemPR #306 tight alignment (D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT): not present inwindows 0.62.2crate bindings (MiniVIalready usesD3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT).Verification
Toolchain
+1.98.1-x86_64-pc-windows-gnu:cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy->asset policy: 354 files okcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings-> passed cleanlycargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1->868 passed; 0 failed; 39 ignoredmemory::tests::hot_fault_page_pins_after_four_round_trips_and_evicts_cold_pages_firstmemory::tests::pinning_respects_fault_young_and_clears_history_on_adopt_unmap_or_gcshadow::card_staging_tests::non_carded_shadow_suppresses_quiet_gpu_writes_after_zero_change_compares_and_wakeshost::check_cut::tests::cuts_before_card_check_when_preceded_by_other_listshost::check_cut::tests::skips_cut_when_check_is_absent_or_firstImported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T16:33:27Z.
Triage (
5e3fd75e, CIcheckPASS):+509/-106acrossmemory.rs,shadow.rs,draw.rs,host.rs,host/check_cut.rs): hot BVH fault-page strike pinning (FAULT_SETTLED = 4), non-cardedQuietcopyback suppression for 8 GB VRAM,FastMapdraw tables, andcard.checksubmit cuts.#282) (especially non-cardedQuietinvalidation on CPU/GPU writes andFaultQueueseviction/GC invariants) + Gate 3 plain--releaseA/B vsmain(21fcafdc,0crashes/DRED) +--features diagnosticsvisual check.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T17:35:40Z.
Triage (
ab04297b, CIcheckFAILURE — run47157821317):triage: needs work:victory-gpuunit testshadow::card_staging_tests::non_carded_shadow_never_quiets_and_recovers_gpu_writes_after_long_idle_streakfailed atcrates/victory-gpu/src/shadow.rs:9377:9(assertion failed: written > 0,871 passed; 1 failed).checkis green, we will continue to Gate 2 Audit (#282) + Gate 3 plain---releaseGPU A/B verification.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T18:04:10Z.
Verified
d5f4ddfefixed thenon_carded_shadow_never_quiets_and_recovers_gpu_writes_after_long_idle_streakfailure and CIcheckis PASS again. Swapped label back totriage: needs gpu test— awaiting Gate 2 Audit (#282) + Gate 3 plain---releaseGPU A/B + visual check.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T19:02:05Z.
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).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T19:02:41Z.
Marking
triage: needs rebaseafter#400merged ontomain(c59a8027). Once rebased with green CI, ready for Gate 2 + Gate 3 GPU A/B.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T20:01:47Z.
Verified clean merge with main (
99bf4088) and CI check PASS. Swapped label to triage: needs gpu test — awaiting Gate 2 Audit + Gate 3 plain --release A/B + visual check.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T22:31:20Z.
Marking
triage: needs rebaseafter#404(32f3e000) merged ontomain. Once rebased cleanly with green CI, ready for Gate 2 + Gate 3 GPU A/B.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T23:31:05Z.
Gate 3 Live RTX 4060 Ti Verification (
3318564): FAIL — Held fromv2026.12.04.01--res 4k --dlss quality, RT OFF): Severe visual corruption observed at 95s — stretched diagonal geometry spike through vehicle/sky, missing character mesh, and pitch-black/checkerboard ground artifacts (253-580dropped draws without host pipeline;Quietskipping347-394declarations /~249 MBin Series S).--series-s --framegen 2 --fg-type dlss): HigherSUBMIT BUSY(57-64 msvs36-37 msonmainaf09c98) and higher Shared VRAM (3.34 GBvs2.95 GB).Quietcopyback skip and isolate why3318564regressed geometry and submit times before re-running Gate 3.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.