Clippy -D warnings clean across the workspace (main's CI gate) #2048
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2048"
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 eleboucher on 2026-11-29T08:24:42Z.
Fixes #
What it changes
cargo build -p victory --features diagnosticson main (4d98ca87) stops with 4 + 3 errors:copystat.rs: the "memory, windows cut nearer" line (from the windows-take merge) callsmb(...), which does not exist in that function. It now has a localmbthat turns bytes into MB, as the line's{:.0} MBexpects.host.rs(Host::submit): the locallet mut timing = ... SubmissionTimingshadows the module'stiming()switch, so the threeif timing()further down called theOption<SubmissionTiming>(E0618: expected function). They now callself::timing(). No behaviour change.How it was tested
cargo xwinfor x86_64-pc-windows-msvc)cargo xwin check -p victory --features diagnosticsfails with E0425 (mb) and E0618/E0277 (timing)cargo xwin check -p victory --features diagnostics,-p victory-gpu --features diagnostics --all-targetsand--workspace --all-targetsall passcargo test: not runChecked for overlap
Update: the
checkjobcheckfailed on this PR because main itself does not passcargo clippy -- -D warningsat829188e9(first error:unwind_copyis never used, in victory-loader; then unused items and lints in victory-gpu and victory-hle). The branch now merges main and adds:unwind_copybehinddiagnostics, the victory-shader lints, the lane-read test returning without a hardware device);GPU: clippy -D warnings cleanandHLE: clippy -D warnings clean: unused imports and variables removed, test-only items behind#[cfg(test)], style lints applied where the result is the same.Eight items that nothing calls any more are kept with
#[allow(dead_code)]and a comment naming the commit that last touched their caller, for a maintainer to keep or delete:HostHeap::mirror_for_pass,MANY_CHUNK,fetch_buffer,create_loose_compute(withloose_compute,fspx_container,MAX_LOOSE_PART),lock_memory,wide_chunk,Shadow::nothing_new_with,recycle::Kind::Card.Checked here: both CI clippy commands (with and without
--all-features) andcargo check --workspace --all-targetsexit 0 forx86_64-pc-windows-msvc. Not run here:cargo test.If #2019 or #2208 lands first, the matching commits drop out on a rebase.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by chaseb64 on 2026-11-29T08:56:49Z.
I built the exact submitted commit
0cd41e32on native Windows usingcargo build --offline --locked --profile diag --features diagnostics --package victory --jobs 7. The diagnostics build completed successfully in 1 minute 32 seconds.I used OpenAI Codex to build and verify this revision.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-29T09:57:30Z.
I also checked the Windows GNU path while testing #1995. On main at
829188e96the diagnostics build hit the missingmbhelper and the shadowedtimingcalls. I applied the same two-file patch as0cd41e32to my local merge of #1995 with that main and built the Windows GPU test executable with diagnostics enabled.I then ran the 15 ambient tests on Windows with the diffuse filter both disabled and enabled. Both runs passed (30 test executions), including the shader compile and hardware/WARP checks. This gives downstream coverage for the diagnostics build on an RTX 4070 Ti SUPER.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wildheathen on 2026-11-29T10:22:03Z.
Same result here on native Windows:
829188e9with this patch (0cd41e32) builds with--profile diag -p victory --features diagnostics, where unpatched main stops at the missingmband the shadowedtiming. The diag build then ran a 3-minute session without problems: RTX 5080 16 GB (driver 621.24), 32 GB RAM, Windows 11 26300, Series X, DLSS Quality, 2560x1440.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Machad3x on 2026-11-29T11:13:44Z.
Confirmed on main
829188e9:cargo build --locked --profile diag -p victory --features diagnosticsfails with 9 errors (E0425mbin copystat.rs:1349-1352, E0618/E0277 from the localtimingshadowingfn timing()in host.rs). An equivalent change (localmbclosure,self::timing()at the 3 call sites) builds clean, exit 0, and produces target\diag\victory.exe. The same fix is also in #2208 (renames the fn tolist_timing); one of the two can be closed. Related: #2164.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T12:52:56Z.
Ran the full CI on native Windows (rustc 1.98.1, x86_64-pc-windows-msvc) with an equivalent set of changes on top of
829188e9, since the PR notescargo testwas not run. Two notes, one of them a behaviour change:1.
slot_evict:busyis a lost check, not an unused variable.cf338ea("Slot eviction: a slot another thread is making is not waited for") added it asand a later merge dropped the
!busy &&. The comment just above the call still says the texture "is in use then, and stays". Renaming it to_makes the loss permanent: a texture whose slot another thread is still making can be unstaged and retired. #2173 restores the check in the same lines, so if this lands after #2173 the_undoes it. Suggest keepingbusyand putting!busy &&back (or leavingresource.rsto #2173).2.
highest_shader_model:_adapter.game_adapter()already returns thehardware_adapter()card, else adapter 0, so the function chooses the card twice. Using thatadapterforD3D12CreateDevice, with the adapter-0 fallback only when that fails, makes the binding used and behaves the same. Minor, but_adapterhides that the #1035 comment and the code below it went out of step in a merge.Test results (
cargo test --workspace --locked --no-fail-fast):checkfailure here is only the threebcpack::tests::oracle_parity_*tests. They fail on main too, and #2236 fixes them (the test oracle still read the BC7 dictionary layout from beforef9de61c). With #2236 applied:victory-formats83 passed, 0 failed.xtaskpolicy::tests::repository_passes_policystill fails on main and with this PR:crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals. No open PR covers it: #2420.victory-hlexmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it, andvictory-gpucard_steps::tests::places_written_after_sending_are_learnedanduav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queue.cargo test -p victory-gpu --features diagnosticsnow compiles and shows one failure that was hidden while the diag build was broken:compose::tests::bgrx_plane_selects_a_typed_view(leftDXGI_FORMAT(88), rightDXGI_FORMAT(93)). CI does not run that configuration, so it does not block this PR.Both clippy commands from
ci.ymlexit 0 here.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-29T13:28:10Z.
@boraswim thanks, both points were right.
slot_evict:busyis back and the!busy &&is restored, by cherry-picking #2173's commit01bb7d7e(author kept), which also brings backfetch_buffer's step-down; my#[allow(dead_code)]onfetch_bufferis gone. If #2173 lands first, that commit drops out on a rebase.highest_shader_model: the device is now made on the adaptergame_adapter()returns, with the adapter-0 fallback when that fails, so the card is chosen once.Both clippy commands from
ci.ymlexit 0 here (Windows target type-check on a Mac);cargo testnot run here. The remaining red check is the threebcpackoracle tests that #2236 fixes.On #2048 vs #2208: same diagnostics fix; I'm fine with whichever the maintainer prefers. This branch also carries main's clippy clean-up, which #2208 does not.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by boraswim on 2026-11-29T13:42:54Z.
Thanks. I ran the full CI on native Windows (rustc 1.98.1, x86_64-pc-windows-msvc) at this branch's head
77d47164, merged with #2236 (18eaf947):cargo clippy --workspace --all-targets --locked -- -D warnings: exit 0cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: exit 0cargo test --workspace --locked --no-fail-fast: every crate passes, including the threebcpackoracle tests with #2236 andvictory-hle(the xmem flake is #2439). Two failures, neither from this branch:xtaskpolicy::tests::repository_passes_policy:frame_users.rs, #2420, also on mainvictory-gpuwatch::many_askers_tests::no_mapping_is_lost_between_askers: one of the parallel-run flakes listed in #2420 (914 passed, 1 failed)So with #2236, the only thing left between main and a green
checkis the policy test.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-30T05:32:42Z.
The diagnostics-build fix this PR started with is in main as
41adb551. What is left here is the clippy cleanup that makescargo clippy --workspace --all-targets --locked -- -D warnings(with and without--all-features) pass on main: 23 files, no behaviour change. The remaining red check is main's BC7 oracle tests (#2236), not this diff. Title updated to match.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-30T14:58:22Z.
Merged main (
c71899d9). Main had already made almost all of this PR's clippy fixes, so main's side was taken in the 12 conflicting files. One new commit for warnings main added since, behaviour-neutral: the card-compare test's twocard_passcalls get the newcaptureargument ([0; 3], as the other callers; main's tests did not compile),seed.is_multiple_of(3), the duplicate MB closure in copystat.rs removed (the laterfn mbis used again), and#[allow(dead_code)]onShadow::ranged(no caller since8ab3c034) and the test-onlyLowered::loop_caps. Both CI clippy commands (--workspace --all-targets --locked -D warnings, with and without--all-features) pass for the Windows target; victory-shader lib tests pass (332).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-30T20:51:21Z.
#4296 now covers what this PR set out to do: both Clippy passes on main (the same
loop_caps,Shadow::rangedandis_multiple_offindings fixed here in7ab1e6f4), plus the twovictory-gputests that fail on this PR's CI run (list::thin::tests::bindings_record_no_work,shader_cache::tests::every_switch_of_the_translator_is_in_the_key). Those two failures are main's own stale tests, not this PR's change: #4296 edits exactlylist/thin.rsandshader_cache.rsfor them.So one of the two is enough to review. #4296 is the more complete one; if it lands, I'll close this one.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-30T23:45:44Z.
Closing: #4296 (merged) covers this, the Clippy findings and the two stale victory-gpu tests.
Pull request closed