gpu: the diagnostics profile compiles again (the missing mb, and timing's shadow) #2208
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2208
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Wazzabeee on GitHub · 2026-11-29 10:33 UTC · original
Wazzabeee:fix-diagnostics-build→main· +12 −7 · 2 files · 2 commits · openWhat 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
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.