gpu: the diagnostics profile compiles again (the missing mb, and timing's shadow) #2208
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2208"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Wazzabeee on 2026-11-29T10:33:50Z.
What it changes
The documented diagnostics build (
cargo build --locked --profile diag -p victory --features diagnostics,AGENTS.md) does not compile onmainat829188e(v2026.11.29.01): 9 errors invictory-gpu.error[E0425]: cannot find function 'mb' in this scope—crates/victory-gpu/src/copystat.rs:1349(and three more). Every memory line of the diagnostics reports formats its byte counts throughmb()(94 call sites), which was never defined;git log -S 'fn mb('finds no commit that ever had it. This PR defines it besidenow_us: bytes in, mebibytes out,f64for the{}/{:.0}/{:.2}of the report lines.error[E0618]: expected function, found 'Option<SubmissionTiming>'—crates/victory-gpu/src/host.rs:9127,:9169,:9180, plus twoE0277size cascades after the:9169one.submit()keeps anOption<SubmissionTiming>in a local namedtiming(release path), and the diagnostics blocks of the same function calltiming()for theVICTORY_GPU_TIMINGswitch: the local shadows the fn. This PR renames the free fn tolist_timing(), afterrelay_timingandsubmission_timing, which already name the switch they read. Six call sites updated.No release-path change: the module is
#[cfg(all(windows, feature = "diagnostics"))]and the blocks are#[cfg(feature = "diagnostics")], so the release build and the plain clippy gate stay green; only the diagnostics profile sees it.How it was tested
cargo build --locked --profile diag -p victory --features diagnosticsfails with the 9 errors above.target/diag/victory.exe(21 MB) runs the title, and aVICTORY_D3D12_DEBUG=1session logs normally (the named-command diagnostics this profile exists for).cargo testpassed for the crates it touches: partly —cargo test -p victory-gpu --locked: 911 passed, 4 failed, 57 ignored. The failures are theambient::testsones (the_passes_compile,the_passes_build,raise_opt_in_chroma_scrub_filters_spikes_and_preserves_scene_tones_on_hardware_and_warp); they fail the same way on unmodifiedmainat829188eon this machine, and this test build compiles no diagnostics code at all (both changes sit behind#[cfg(feature = "diagnostics")]), so the tested code is identical tomain's here.mainon this machine as well, with and without this branch, none of it in the files this touches:cargo clippy --workspace --all-targets --locked -- -D warningsfails invictory-loader(a dead_code error); the--all-featuresvariant also fails invictory-shader(threetoo_many_argumentson the lib, one more in lib test, awhile_immutable_condition);cargo test --workspace --lockedfails invictory-formats(the threebcpack::tests::oracle_parity_*tests, 80 passed 3 failed).Checked for overlap
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.