[P1] Enable wide shader loads, tiered buffer lookup, and title priority cap (#276) #374
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/374"
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-03T06:51:42Z.
Adapts three pure CPU/GPU performance improvements cleanly onto
mainfrom GPL-3.0 upstream (linkoovosh/LinkoArts-buildandTrustNo1/Darner) to address #276:Summary
opt::WIDE(4-dword scalar buffer loads) inopt::DEFAULT(linkoovosh/LinkoArts-buildfd9443e, GPL-3.0):crates/victory-shader/src/emit/bitcode/opt.rs: changeopt::DEFAULTfromALL & !WIDE(63) toALL(127).VICTORY_SHADER_OPT=63remains available as the clean opt-out toggle.crates/victory-shader/src/emit/mod.rs: updateshader_opt()docs andthe_clean_up_switch_parses_or_runs_every_passforDEFAULT == 127.BTreeMapbuffer lookup inshadow.rs(linkoovosh/LinkoArts-build93c6311, GPL-3.0):crates/victory-gpu/src/shadow.rs: replace full bounded linear scans inBUFFERSwithBufferspartitioned intoTIERS = [4 << 10, 64 << 10, 1 << 20, 16 << 20](each backed byBTreeMap<u64, Arc<ShadowBuffer>>+ exact live count), preservingReadMostlysharding andFOUNDthread-local fast-path caching.tiered_lookup_tests::tiered_find_answers_as_the_full_scan,insert_overwrites_same_key_and_unregister_tightens_tier) proving exact equivalence against a full scan across all boundary sizes and shrink/removal edge cases.TrustNo1/Darner2a8566e, GPL-3.0):crates/victory-hle/src/modules/kernel.rs&apps/victory/src/play.rs: addVICTORY_TITLE_PRIORITY_MAXand default it to0(THREAD_PRIORITY_NORMAL) inplay.rsSETTINGS, capping above-normal title worker threads while leavingTHREAD_PRIORITY_TIME_CRITICALaudio/real-time threads untouched.priority_max_holds_all_but_time_critical.(Note:
TrustNo1/Darnerf9d1276KEPT_APARTwas inspected and omitted becauseMiniVIdescriptor/host.rsalready retires descriptor slabs viakept_raw+rtas_slots+crate::host::retireoutsidedrop(guard).)Verification (RTX 4060 Ti 8 GB / 32 GB RAM / active pagefile)
cargo xtask policy->asset policy: 343 files okcargo clippy --workspace --all-targets --locked -- -D warnings&--all-features --locked -- -D warnings-> 0 warnings--locked):victory-hle --lib -- kernel: 11 passed, 0 failed (240 filtered out)victory-shader --lib -- opt the_clean_up_switch scalar_buffer_loads: 13 passed, 0 failed (395 filtered out)victory-gpu --lib -- tiered_lookup_tests shadow: 64 passed, 0 failed, 3 ignored (788 filtered out)victory --bins: 47 passed, 0 failedMiniVI.exe--res 4k --dlss quality&--res 1440 --dlss quality, Series X target):dedicated_mbpeaked at5962 MBvsmin_budget_mb=6764 MB(6797 MBat end,max(ded-bud)=-835 MB, planned headroom640 MBactive),private_commit_mbstayed bounded (8644 -> 20994 MB,max_commit=21056), zero shader translation regressions (only the 5 existing wave64 compute shaders dropped), zero DRED/DeviceRemoved/panics, audio DSP/APU initialized cleanly (256streams), last 12 steady samples averaged5.44 fps(gpu_ms=98.39, settling to51.7-95.2 mson GPU after initial compile burst).dedicated_mbpeaked at5691 MBvsmin_budget_mb=6720 MB(6814 MBat end,max(ded-bud)=-1114 MB),private_commit_mbbounded (8048 -> 19918 MB), zero DRED/DeviceRemoved/panics, audio healthy, last 12 steady samples averaged7.63 fps(prep_ms=23.8, settling at7.8-8.5 fpsonce pipelines built).Credits
linkoovosh/LinkoArts-build(fd9443e,93c6311) — GPL-3.0TrustNo1/Darner(2a8566e) — GPL-3.0Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T07:02:19Z.
Architect Read-Only Code Audit (
3c336ef6, CI47053295053GREEN, allowlisted):shadow.rsBufferstieredBTreeMap(TIERS = [4 KiB, 64 KiB, 1 MiB, 16 MiB]): exact equivalence to full scan (32,000-query fuzz test + overwrite/shrink test), preservesReadMostlysharding &FOUNDTLS cache, and switchesnear()from write lock tobuffers_read().kernel.rs+play.rsVICTORY_TITLE_PRIORITY_MAX=0: cleanly clamps non-TIME_CRITICALtitle worker priorities toTHREAD_PRIORITY_NORMAL, skips redundantSTARTUP_RAISEDtracking, preservesTIME_CRITICAL(15) audio threads, and allows opt-out (off/2).opt.rs+emit/mod.rs(opt::DEFAULT = ALL=127,VICTORY_SHADER_OPT=63opt-out): recursivevictory-gpu/build.rs(from#372) auto-invalidates pre-#374disk cache cleanly.triage: needs gpu test): The posted 2-min runs were clean-cache single-arm runs (7.63 fps1440p /5.44 fps4K including initial shader compile). Please post a quick warm-cache plain--releaseA/B vsmain(15d97184) (1440p and/or 4K) confirming zero FPS/preparingregression on warm cache (especially verifyingopt::WIDE+VICTORY_TITLE_PRIORITY_MAX=0is net-positive/neutral on MiniVI) -> ready to merge immediately once posted!Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T07:15:26Z.
Deep Static Logic Audit — Pass #8 (
3c336ef6): VERIFIED CLEAN (Green Light) — 0[P0], 0[P1]blockers (full verdict table posted toAndrotim/MiniVI#282).Verified
opt::WIDE(opt::DEFAULT=127, 4B alignment, raw-SRV OOB zeroing,VICTORY_TRANSLATOR+shader_opt()+v2cache isolation, Wave32/RDNA 4 Wave64 safety),shadow.rstieredBTreeMapequivalence &ReadMostly/FOUNDlock safety, andVICTORY_TITLE_PRIORITY_MAX=0preserving bothvictory XMA decoder(HIGHEST=2) and titleTIME_CRITICAL(15) audio threads.Verified
descriptor/host.rsalready retireskept_raw/kept_pinsoutside slot &nextlocks (KEPT_APARTomission safe), with full GPL-3.0 credits (linkoovosh/LinkoArts-build,TrustNo1/Darner) and clean-room hygiene.