Add 'victory doctor' command #183
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/183"
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 fxceless/victory-fork. Originally posted by AndradeTK on 2026-11-24T22:18:12Z.
Reports whether this machine can run the title's world, with no game data required: OS build, CPU, RAM and commit charge, primary GPU and VRAM, mesh-shader / shader-model 6.6 support, and the dxil.dll path, ending in a verdict (NOT READY / MENUS ONLY / READY). Verified locally on an i7-14700HX
Imported from fxceless/victory-fork. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T22:23:45Z.
Review: COMMENTED
🟡 Changes recommended
The doctor can issue incorrect readiness verdicts by conflating shader capabilities, requiring an optional validator DLL, mixing data from different GPU adapters, and omitting the required AVX2 check.
4 open issues
What changed in this PR
Adds
victory doctor, a diagnostic command that reports host hardware and shader support and estimates world readiness without requiring game data.Changes:
crates/victory-gpu/src/lib.rsCargo.lockapps/victory/src/main.rsdoctorcommand.apps/victory/src/doctor.rsapps/victory/Cargo.tomlReview effort: Balanced
Imported from fxceless/victory-fork. Originally posted by Izumemori on 2026-11-24T22:28:05Z.
What's the point of this? First of all a "doctor" command should be diagnosing what is wrong, file integrity, other non trival checks. Not just run a plump compat check and exit. That's what a README and eyes are for. And second of all this whole thing is based on hardcoded assumptions that might and probably will be wrong within hours.
The separation into "can run menus" and "can run the game" also is useless outside initial debugging.
You're just adding extra code that doesn't do anything useful and will be immediately abandoned.
Imported from fxceless/victory-fork. Originally posted by Copilot on 2026-11-24T22:23:44Z.
Code review location:
apps/victory/src/doctor.rs; line 13A host with shader model 6.6 but no mesh shaders can still run the menus (
README.md:129-130), but the combined capability flag makes it report NOT READY. Expose shader-model and mesh-shader support separately, and return MENUS ONLY when only mesh shaders are missing.Imported from fxceless/victory-fork. Originally posted by Copilot on 2026-11-24T22:23:44Z.
Code review location:
apps/victory/src/doctor.rs; line 23This reports MENUS ONLY on otherwise capable machines without
dxil.dll, although translated shaders do not require the validator (crates/victory-shader/src/emit/validator.rs:1-3). Keep the DLL path informational rather than making it a readiness requirement, and update the corresponding verdict test.Imported from fxceless/victory-fork. Originally posted by Copilot on 2026-11-24T22:23:44Z.
Code review location:
apps/victory/src/doctor.rs; line 90The verdict never checks the CPU's required instruction set.
README.md:129-131requires AVX2, and victory-loader executes the title's original x86-64 code natively. A pre-AVX2 CPU paired with sufficient RAM and a modern GPU can therefore receive READY even though it cannot execute the title. Check AVX2 support before issuing the verdict and report NOT READY when it is absent.Imported from fxceless/victory-fork. Originally posted by Copilot on 2026-11-24T22:23:44Z.
Code review location:
apps/victory/src/doctor.rs; line 144On multi-GPU machines, choosing the adapter with the most VRAM can combine one GPU's name and memory with another GPU's capabilities:
gpu_info()uses the runtime device created incrates/victory-gpu/src/host.rs:548. This can incorrectly pass the VRAM requirement using an unused GPU's memory. Obtain the description and VRAM from the runtime device's adapter LUID, ashost.rs:603-604already does, and report all GPU facts from that adapter.Imported from fxceless/victory-fork. Originally posted by deepdev237 on 2026-11-25T04:03:24Z.
Full test environment
x86_64-pc-windows-msvccargo build --profile diag -p victory --features diagnostics(diag= release + debug info)main310c6eb6c16822ab95076aad61fce19bba86bb98levels.rpf,audio.rpf,pack/story000/story000.rpf,navmeshes.rpfand sixdata/ttdb/*.ttpf), so failures that depend on those bytes are not emulator bugs.Build report: this branch does not compile on Windows as it stands (head
af3d4a4), alone or merged onto currentmain(310c6eb).Error (
cargo build --profile diag -p victory --features diagnostics, rustc 1.98.1, Windows 11 26300):crates/victory-gpu/src/lib.rscallsh.shader_model_6_6(), but no such method exists inhost.rson this branch (git grep "fn shader_model_6_6" af3d4a4finds nothing), on its merge base, or onmain. The only shader-model query inhost.rsis the one insideHost::mesh_shaders().Fix I used locally (added next to
mesh_shaders()incrates/victory-gpu/src/host.rs; all imports are already in scope there):With that change it builds. The full
cargo testofvictory,victory-game,victory-gpu,victory-hle,victory-loaderandvictory-shaderpasses (598 passed, 0 failed, 6 ignored) onmain310c6ebplus about 100 other open PRs merged together, on an AMD Radeon RX 9060 XT (driver 32.0.32015.7029) with a Ryzen 9 5950X and 24 GB RAM.Two smaller merge notes from the same integration:
apps/victory/Cargo.tomlends up withvictory-gpu.workspace = truetwice (Cargo:duplicate key). Delete one of the two lines.Exact state tested
af3d4a41c948901f84a0c20e7a3183addf44e1fb(2026-11-24T18:07:48-06:00), merged withgit merge --no-ffin the integration below.cargo buildafter the merge; with the method above added it builds cleanly (one unrelateddead_codewarning:placed_filler_twinsinresource.rs).git grep -n "fn shader_model_6_6" af3d4a4 -- cratesand the same on its merge base withmain: no match. The only call iscrates/victory-gpu/src/lib.rs:76(shader_model_6_6: h.shader_model_6_6(),).victory doctorcommand itself. Only the build and the test suites were run.Integration test run, every test binary
Command:
cargo test --profile diag -p victory -p victory-game -p victory-gpu -p victory-hle -p victory-loader -p victory-shader --features victory/diagnostics, onmain310c6ebplus about 110 open PRs merged in order (list with outcomes:integration-merge-log.tsvin the gist). PR #445 is reverted there.victory(unit)victory-gamevictory-gpu(includes tests on the real D3D12 device)victory-hlevictory-loaderunit /no_dll_planting/load_probe/title_dllsvictory-shader(includes the hardware shader tests, 29.9 s)Full output:
integration-test-all.login https://gist.github.com/deepdev237/785e05b02d0dcece7aac1303f7fe4ba8View 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.