Shaders: the two clippy errors that stop main's clippy in lower.rs #1517
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1517"
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 babuakhil on 2026-11-28T21:10:03Z.
On
main(77df871), clippy stops at two errors incrates/victory-shader/src/emit/lower.rs, before it reaches the other crates:The change (2 lines, no behaviour change)
colourin the output stores: two merged PRs each made one. The outerlet colour = self.s.pixel && matches!(e.target, Target::Color(_));is never read: thelet colour = is_ps && el.kind == 16;made per element a few lines down shadows it and is what decides the NaN scrub and HDR clamp. The outer one goes; what runs is unchanged. (If the outer definition was the intended one, that is a separate choice; this keeps current behaviour.)if per == 0 { 0 } else { spare / per }→spare.checked_div(per).unwrap_or(0), the same value.Tested
Windows 11, Rust 1.98.1 (pinned):
cargo clippy -p victory-shader --all-targets --locked -- -D warnings: passescargo test -p victory-shader --lib --locked: 348 passed, 0 failed (on923e38c; rebased cleanly onto77df871)CI will still be red, and why
With
victory-shaderbuilding, clippy goes on and reports the errors these two were hiding invictory-gpu:dropping_referencesinhost.rs's present fallbacks: a real lock bug, fixed by #1459send.rsgpu,pool.rslet_go,resource.rshost_pressure_reclaimed),identity_op(1 * MIB/GIB),too_many_arguments, a constant assertion, onemanual_is_multiple_ofThose are left out on purpose: they are dead-code and style choices for the owners of that code. The policy failure (
lower.rsover 640 KiB) is #1429 / #1460.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T22:33:01Z.
The
victory-gpufindings you left out are now in #665, redone ond4b5d517:copystat's cfg;send::Memory's unreadgpufield goes;identity_ops and the constant assertion are fixed;is_multiple_of;too_many_argumentsallows, as 32 other functions have.There are no behaviour changes, and #1459's three drops stay with #1459.
Checked locally on
d4b5d517with this PR, #1459, #665 and #1493 merged (#1460 would do for the size limit): CI's three steps pass. Both clippy runs are clean with-D warnings, andcargo test --workspace --lockedgives 1,306 passed, 0 failed.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by babuakhil on 2026-11-28T22:57:01Z.
Thanks, that fits together. Confirmed here on Windows 11 (RTX 3060, Rust 1.98.1):
d4b5d51with this PR, #1459, #665 and #1493 merged in that order, no conflicts. CI's three steps:cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --lockedAlso
cargo test --workspace --locked --all-features: 1365 passed, 0 failed, so the diagnostics-only tests (#1294) are clean with the set too.