Add a victory doctor command to check a PC before a run #285

Open
opened 2026-11-26 19:01:35 +00:00 by github-bot · 2 comments
Owner

@⁠D4rkGh057 on GitHub · 2026-11-26 18:55 UTC · original

Problem

The README says the project was tested on one PC. When a run goes wrong on
another machine, a report has no hardware facts: which GPU, whether it has
shader model 6.6, mesh shaders, or OpenExistingHeapFromAddress1. Several of
these are hard requirements (probe_view_limit, Host::mesh_shaders,
inplace.rs), and when one is missing the run fails late or just runs slower.

Proposal

A read-only subcommand, victory doctor [<exe>], that prints one line per
check and exits non-zero if a required check fails:

  • CPU: AVX2 (the title needs it; run.rs already checks it at run time).
  • GPU: adapter name, vendor/device id, dedicated VRAM, software adapter or not.
  • Shader model 6.6 (required), mesh shaders (warning if absent), wave lane range.
  • OpenExistingHeapFromAddress1 on committed private memory (required).
  • With the game executable: its BLAKE3 against victory_game::KNOWN_BUILDS
    (a warning while that list is empty).

Example on an RX 9060 XT:

[ok  ] cpu                AVX2 available
[ok  ] gpu                AMD Radeon RX 9060 XT (vendor 0x1002, device 0x7590, 16191 MiB dedicated)
[ok  ] shader model       6.6
[ok  ] mesh shaders       supported
[ok  ] wave lanes         32 to 64
[ok  ] heap from address  OpenExistingHeapFromAddress1 works
[skip] game build         no executable given (victory doctor <exe>)

Reports could then paste this output, and an issue template could ask for it.

Patch

I have a patch against 2de9980 (about 350 lines, Windows only like warm):

  • apps/victory/src/doctor.rs (new) and the subcommand in main.rs.
  • victory_shader::emit::host::gpu_report(), next to create_preferred_device,
    so the app needs no direct windows dependency.
  • windows-sys gets the Win32_System_Memory feature in victory-shader.
  • 4 unit tests (check logic and the shader-model helper). The GPU and build
    checks need real hardware, so CI would only cover the logic.

git apply --check passes on 2de9980, and cargo test -p victory doctor
passes. I can open a PR if you want it.

Not covered

  • OS build and installed RAM (the README recommends 64 GB).
  • A per-site "would the patch apply" report. With one known build the offsets
    match, so I left it out.

victory-doctor.zip

**@⁠D4rkGh057** on GitHub · 2026-11-26 18:55 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/285) ## Problem The README says the project was tested on one PC. When a run goes wrong on another machine, a report has no hardware facts: which GPU, whether it has shader model 6.6, mesh shaders, or `OpenExistingHeapFromAddress1`. Several of these are hard requirements (`probe_view_limit`, `Host::mesh_shaders`, `inplace.rs`), and when one is missing the run fails late or just runs slower. ## Proposal A read-only subcommand, `victory doctor [<exe>]`, that prints one line per check and exits non-zero if a required check fails: - CPU: AVX2 (the title needs it; `run.rs` already checks it at run time). - GPU: adapter name, vendor/device id, dedicated VRAM, software adapter or not. - Shader model 6.6 (required), mesh shaders (warning if absent), wave lane range. - `OpenExistingHeapFromAddress1` on committed private memory (required). - With the game executable: its BLAKE3 against `victory_game::KNOWN_BUILDS` (a warning while that list is empty). Example on an RX 9060 XT: ``` [ok ] cpu AVX2 available [ok ] gpu AMD Radeon RX 9060 XT (vendor 0x1002, device 0x7590, 16191 MiB dedicated) [ok ] shader model 6.6 [ok ] mesh shaders supported [ok ] wave lanes 32 to 64 [ok ] heap from address OpenExistingHeapFromAddress1 works [skip] game build no executable given (victory doctor <exe>) ``` Reports could then paste this output, and an issue template could ask for it. ## Patch I have a patch against `2de9980` (about 350 lines, Windows only like `warm`): - `apps/victory/src/doctor.rs` (new) and the subcommand in `main.rs`. - `victory_shader::emit::host::gpu_report()`, next to `create_preferred_device`, so the app needs no direct `windows` dependency. - `windows-sys` gets the `Win32_System_Memory` feature in `victory-shader`. - 4 unit tests (check logic and the shader-model helper). The GPU and build checks need real hardware, so CI would only cover the logic. `git apply --check` passes on `2de9980`, and `cargo test -p victory doctor` passes. I can open a PR if you want it. ## Not covered - OS build and installed RAM (the README recommends 64 GB). - A per-site "would the patch apply" report. With one known build the offsets match, so I left it out. [victory-doctor.zip](https://github.com/user-attachments/files/35478505/victory-doctor.zip)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:01:35 +00:00
Author
Owner

@⁠mutlusinan on GitHub · 2026-11-26 20:15 UTC · original

A reference for this: stellarr-studio/kelvaroq's launcher already does most of what a victory doctor would check, and picks engine settings from the result.

  • What it detects: the high-performance adapter, its driver and dedicated VRAM; CPU physical and logical cores; RAM; the Windows build.
  • What it checks: feature level 12.0, Shader Model 6.6, mesh shaders, resource binding tier 3, root signature 1.1; it also reports wave widths, enhanced barriers and GPU upload heap support (Resizable BAR).
  • Low memory: a separate warning below 16 GiB of RAM.
  • Automatic profile by VRAM and RAM: VICTORY_TEXTURE_STAGE_MB 64/128/192, VICTORY_CARD_BUFFERS_MB 256/512/1024 and VICTORY_QUEUE2_LANDING_MB 32/64/96 for <10 GiB, ≥10 GiB VRAM + 16 GiB RAM, and ≥16 GiB VRAM + 32 GiB RAM. VICTORY_WIDE_THREADS is set to half the physical cores, between 1 and 12.

Code: src/hardware.rs and src/launcher/Hardware.cs (GPL-3.0; one function in hardware.rs, the shader-support and wave-width query, is marked "Approach after XCL 8ba374c", and XCL is GPL-2.0-only, so take the checks as a list rather than the code). Their README, "Hardware profiles", has the table. Their switch names partly differ from this fork's, so the thresholds are a starting point rather than something to copy. #268 (victory system) covers the reporting half.

Two things a doctor here could add on top, from this repo's own issues:

  • warn when -Fsr4K is asked for on a GPU without an FSR 4.1.2 provider (#323);
  • warn when the view heap will be capped (NVIDIA: 1,000,000 slots, #9, #15).
**@⁠mutlusinan** on GitHub · 2026-11-26 20:15 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/285#issuecomment-7202471197) A reference for this: stellarr-studio/kelvaroq's launcher already does most of what a `victory doctor` would check, and picks engine settings from the result. - **What it detects:** the high-performance adapter, its driver and dedicated VRAM; CPU physical and logical cores; RAM; the Windows build. - **What it checks:** feature level 12.0, Shader Model 6.6, mesh shaders, resource binding tier 3, root signature 1.1; it also reports wave widths, enhanced barriers and GPU upload heap support (Resizable BAR). - **Low memory:** a separate warning below 16 GiB of RAM. - **Automatic profile by VRAM and RAM:** `VICTORY_TEXTURE_STAGE_MB` 64/128/192, `VICTORY_CARD_BUFFERS_MB` 256/512/1024 and `VICTORY_QUEUE2_LANDING_MB` 32/64/96 for <10 GiB, ≥10 GiB VRAM + 16 GiB RAM, and ≥16 GiB VRAM + 32 GiB RAM. `VICTORY_WIDE_THREADS` is set to half the physical cores, between 1 and 12. Code: [`src/hardware.rs`](https://github.com/stellarr-studio/kelvaroq/blob/e062a82e04853bbcae281d166980e0a9b65c975a/src/hardware.rs) and [`src/launcher/Hardware.cs`](https://github.com/stellarr-studio/kelvaroq/blob/e062a82e04853bbcae281d166980e0a9b65c975a/src/launcher/Hardware.cs) (GPL-3.0; one function in `hardware.rs`, the shader-support and wave-width query, is marked "Approach after XCL 8ba374c", and XCL is GPL-2.0-only, so take the checks as a list rather than the code). Their README, "Hardware profiles", has the table. Their switch names partly differ from this fork's, so the thresholds are a starting point rather than something to copy. #268 (`victory system`) covers the reporting half. Two things a doctor here could add on top, from this repo's own issues: - warn when `-Fsr4K` is asked for on a GPU without an FSR 4.1.2 provider (#323); - warn when the view heap will be capped (NVIDIA: 1,000,000 slots, #9, #15).
Author
Owner

@⁠D4rkGh057 on GitHub · 2026-11-26 20:22 UTC · original

Thanks for the reference and for the license note. Taking the list of checks rather than the code makes sense.

On the two extra warnings:

  • View heap cap (#15): this fits well. The cap is measured on the device, not decided by vendor, so the check could try to create a shader-visible CBV/SRV/UAV heap of 2^21 slots and warn if that fails. It would be a small addition to the GPU report that doctor already builds.
  • FSR 4.1.2 provider (#323): useful, but more work. The provider lookup is private to the FidelityFX module and keeps its result in global state, so doctor would need a read-only probe that loads the DLL, queries it and releases it, and it should only run when -Fsr4K or fidelityfx_dir is set. That could be a follow-up.

One correction: #9 is about the wave64 gap on an RTX 5060, not the view heap, so it does not apply to the cap warning. #15 is the right reference.

**@⁠D4rkGh057** on GitHub · 2026-11-26 20:22 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/285#issuecomment-7202592911) Thanks for the reference and for the license note. Taking the list of checks rather than the code makes sense. On the two extra warnings: - **View heap cap (#15):** this fits well. The cap is measured on the device, not decided by vendor, so the check could try to create a shader-visible CBV/SRV/UAV heap of 2^21 slots and warn if that fails. It would be a small addition to the GPU report that `doctor` already builds. - **FSR 4.1.2 provider (#323):** useful, but more work. The provider lookup is private to the FidelityFX module and keeps its result in global state, so `doctor` would need a read-only probe that loads the DLL, queries it and releases it, and it should only run when `-Fsr4K` or `fidelityfx_dir` is set. That could be a follow-up. One correction: #9 is about the wave64 gap on an RTX 5060, not the view heap, so it does not apply to the cap warning. #15 is the right reference.
This discussion has been locked. Commenting is limited to contributors.
No description provided.