d3d12: the two clippy warnings main still has #2877
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2877:github-pr/2877" git switch "github-pr/2877"
Open
leonida/mandy
fiestorra wants to merge 1 commit from
github-pr/2877 into main
pull from: github-pr/2877
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2877
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/2877"
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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Reduced to what
mainstill has. The four fixes this branch started with are onmainalready, from the other version of them (#2873):let _ = places.insert(..),while letinpipeline/known.rs,(0.0..1e9).contains(&v)inglyphs/live.rs, and a struct formesh_pipeline's shader bytecodes (MeshStagesthere). That is why the branch had goneDIRTY: it was re-applying what had landed.What is left, and is only here:
1. The six
--all-targetswarnings inemit/valu_tests.rs. Clippy wantsa != bfora < b || a > b, and in a table of RDNA2's sixteenf32compare predicates those are not the same function:The two lints (
neg_cmp_op_on_partial_ord,double_comparisons) are allowed on that one test, with the reason in the doc comment above it.2.
unused_mutonsend_published'sHandoff. What writes it is behinddiagnostics, so the parameter losesmutand keeps the binding under that feature:Measured on
main1fff69129, before and after:The one that fails is
descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in("copied as it was made"), and it fails the same way onmainwithout this change — checked with the change stashed. It is not this branch; it is worth its own look, because it fails on an RTX 4090 and the WARP runner does not run it that way.With
--features diagnosticsnothing new appears: the one warning inleonida-gpu/src/host.rsunder that feature is at line 4677, not here.AI-assisted: yes — DeepSeek v4.1 (flash), which measured both sides of the tree and stashed its own change to check the failure was not its.
Written with an AI assistant.
Independent clean-target Clippy and GPU comparison check at
118118191+9f27ba2e1, Rust 1.98.1, Win64 MSVC target.clippy --workspace --all-targetsproduced 11 diagnostics on main and 1 on the PR, counting each original diagnostic once. The four targeted warnings and six intentionally allowed comparison warnings disappeared. The remainingunused_mutis inhost.rs::send_published; the code that mutateshis behinddiagnosticsand this was the default-feature check. The NaN comparison fixture also passed on AMD RADV and RTX 4070 SUPER under Wine with real D3D12 dispatch. Both lint builds used separate fresh Cargo target directories.AI-assisted with OpenAI Codex (GPT-6).
Follow-up on the remaining
unused_mutatsend_published. I checked the overlap with #2873 on3e7b34a5: the two branches conflict in the three files implementing the four shared fixes. With #2873's implementations and boundary test retained, the only additional change from this PR is the scoped NaN test annotation.In that combination, replacing
mut h: Handoffwithh: Handoffand adding#[cfg(feature = "diagnostics")] let mut h = h;at entry is sufficient forcargo xwin clippy --workspace --all-targets -- -D warningsto pass with default features (Win64 MSVC target, Rust 1.98.1). Enabling diagnostics checks the mutable path and still reports ten diagnostics already present onmain.MEASURED, AI-assisted (Codex).
VERIFY-2877 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files
Verdict: PASS, with two things to know: it conflicts with #2873, and the
#[allow]it adds is documentation rather than part of the warning count.Head
11811819, base the currentmain88a9f133, merge base21e6bbf4, 1 commit, 4 files, +33/−11:d3d12/crates/leonida-gpu/src/pipeline/host.rs,d3d12/crates/leonida-gpu/src/pipeline/known.rs,d3d12/crates/leonida-hle/src/modules/glyphs/live.rs,d3d12/crates/leonida-shader/src/emit/valu_tests.rs.1. What it fixes
Four clippy warnings that came back after #2681 and #2682 landed, and six more in
valu_tests.rsthat get an#[allow]and an explanation instead of a change.known.rs:246—dropon aCopyvalue.drop(places.insert(hash, …))becomeslet _ = places.insert(hash, …), which is what the function just below it (make) already does.known.rs:268— aloopthat should be awhile let.host.rs:1214—mesh_pipelinehas too many arguments (8/7). The three shader bytecodes become a struct:so it takes six arguments, and the body destructures it on its first line. Only the four call sites change shape.
live.rs:121—manual_range_contains.v >= 0.0 && v < 1e9becomes(0.0..1e9).contains(&v).2. The
valu_tests.rsexplanation is right, and I checked the semanticsThe pull request says the six warnings there must not be "fixed", because clippy's suggestion would change what the test asserts. The table is RDNA2's sixteen
f32compare predicates:I ran the comparisons with a NaN operand:
So with a NaN operand
a < b || a > bis false anda != bis true — clippy's shortcut is not the same predicate, and taking it would make the test pass while checking the wrong thing. The pull request's reasoning is correct, and the#[allow]it adds names exactly the three lints that ask for it (neg_cmp_op_on_partial_ord,nonminimal_bool,double_comparisons).3. One clarification about the
#[allow]The three lints it allows are pedantic lints; the repository enables
clippy::all([workspace.lints.clippy] all = { level = "warn", priority = -1 }), which does not include pedantic. So the#[allow]is not what takes the count from 15 to 0 — the four fixes are.I confirmed it: with
-W clippy::pedanticthe#[allow]suppresses the warnings at those lines, and removing it brings them back:That makes the
#[allow]worth keeping — it stops a later "fix" from breaking the test, and it documents why — but it is not part of the warning count, which is worth knowing when reading the pull request's numbers.4. It conflicts with #2873
Both pull requests change the same three files, and merging them together fails:
They are two versions of the same fixes: the same
let _ =andwhile letinknown.rs, the same struct-for-the-arguments inhost.rs(Stageshere,MeshStagesin #2873), the same range rewrite inlive.rs. They differ in the details — this one adds the comments and the#[allow], #2873 adds a test for thelive.rsrewrite. One of the two needs to be rebased onto the other; I would keep this one's comments and#[allow], and #2873's test.5. What I checked in the part that builds here
leonida-shaderis the only crate of the four that builds on Linux, and it is the one with the#[allow]:cargo clippy -p leonida-shader --all-targetson this branch: the three lints it allows do not appear, and themanual_range_containsinlive.rsis not in this crate.cargo test -p leonida-shader: 247 passed, 0 failed, 2 ignored.I also checked the
live.rsrewrite's semantics against the version withis_finite()kept — the two are the same for every value I could throw at them (2 000 000 randomf64bit patterns, 17 hand-picked values including NaN and ±∞, and the1e9boundary: zero differences). The range form rejects NaN and ±∞ on its own, because both comparisons are false for a NaN.6. What I did not check
cargo clippy --workspace4 → 0,--all-targets15 → 0).leonida-gpuandleonida-hledo not build on Linux for reasons that predate this pull request (upstream: "The crates are Windows-only today … Linux follows #2577"), and clippy needs the crate to compile. The counts also depend on which crates build, which is platform-dependent. So I verified the shape of the fixes (the lint names, the code) and the one crate I could run, not the numbers.leonida-gpuandleonida-hle— same reason. The pull request quotes241 passedforleonida-hleand627 passedforleonida-gpu --lib -- --test-threads=1; I did not run them.Stagesstruct's field namecodeis the best choice — it shadows the meaning of "code" used elsewhere in the file (code(0),code(&ms)are bytecodes). A matter of taste; I am not asking for a change.cargo fmtis left out of the d3d12 workflow, and this pull request'shost.rslines are long enough thatrustfmt --checkwould reformat them.AI-assisted: MiniMax M3.1 Flash.
Verified on Windows 11, Rust 1.98.1, no GPU and no game files.
The claim holds on the pull request's own base. The warnings were counted from the compiler's own JSON messages (one per line), so the count is what the compiler reported and not a summary line's word for it:
cargo clippy --workspace... --all-targetse04721c7f118118191The four the report names are all there on the base, and all four are gone on the head:
clippy::too_many_argumentsatcrates/leonida-gpu/src/pipeline/host.rs:1214(8/7)dropping_copy_typesatcrates/leonida-gpu/src/pipeline/known.rs:246clippy::while_let_loopatcrates/leonida-gpu/src/pipeline/known.rs:268clippy::manual_range_containsatcrates/leonida-hle/src/modules/glyphs/live.rs:121and the six in
leonida-shader/src/emit/valu_tests.rs(double_comparisonstwice,neg_cmp_op_on_partial_ordfour times) are still there on the head, as the report says they stay.Two things the report should say, because both are measured and neither blocks the change.
1. The base's counts are five and sixteen, not "four and fifteen". The fifth warning on the base is
unused_mutatcrates/leonida-gpu/src/host.rs:7435(fn send_published(&self, mut h: Handoff)- themutis not needed). It arrived after the commit this pull request was measured on:b4d328901("gpu: send prepared lists in order") changed that signature. So the report's "four" and "fifteen" were right for themainit was written against and are one short for the base the pull request now records,e04721c7f. The head does not have that warning because it does not have that commit - the pull request's branch is older than the base GitHub records for it.2. What happens when it lands on the current
main. The pull request's own branch is clean, but its branch does not containb4d328901, so theunused_mutis not something it fixes.maintoday has that warning (measured:cargo clippy --workspaceonorigin/mainreports it). The pull request's commit was put on top of the currentmainin a worktree - what GitHub would merge - and measured there:main27613ab6bcargo clippy --workspaceunused_mutatcrates/leonida-gpu/src/host.rs:7435)cargo clippy --workspace --all-targetsSo a merge that brings this pull request's commits onto the current
mainleaves that one warning in place, and "clippy is at zero" would not be true of the result. The fix is one word:fn send_published(&self, h: Handoff). Whether that belongs in this pull request or in its own is the maintainer's call; the point is that the tree it produces is not at zero.One note on the
host.rschange, which is the one with a shape. The three shader bytecodes become aStagesstruct so thatmesh_pipelinetakes six arguments instead of eight. The nameStagesis used for something that is not the pipeline's stages - it is the shader bytecodes the mesh pipeline takes - andStagesis already a name in this crate for the actual stage set. A name that says what the thing is (MeshShaders,ShaderBytes) would keep the two apart.Not checked: the warnings on a Linux host (clippy's lints are the same, but only Windows was run here); the crates outside the workspace.
All four reviews read, and four things changed because of them. Head is now
3e7b0c563, rebased ondcda41f76, 5 files.The
unused_mutthat would have survived the merge (Neutron-0, merzleckeier, KelboLive). You are right, and this was the one that mattered: the parameter wasmut h: Handoffand everything that writes it is behinddiagnostics, so the tree GitHub produces carriedunused_mutand "clippy is at zero" was false of the result. It is now:which is the shape merzleckeier measured.
cargo clippy --workspaceand--all-targetsare both 0 at the head and on a merge intodcda41f76— the second is the number you were checking, and it is the one I should have reported.Stages→MeshShaders(Neutron-0, and the name clash is real:stagesis already the crate's own stage set). I also found out why a careless rename is dangerous here:-replacein PowerShell is case-insensitive, so my first attempt renamed thestagesvariable too. The committed rename is case-sensitive and leaves everystagesalone.The doc (Neutron-0): the stream-forms doc goes back on
mesh_pipeline, and the struct gets two lines of its own. My insertion had left both on the struct.nonminimal_boolleaves the allow (KelboLive): no warning asked for it and--all-targetsis still 0 without it.And the sentence you caught, KelboLive: "the test would pass while checking the wrong thing" is backwards, as you say - changing
wanttoa != bmakes the NaN rows fail, which is louder than passing wrongly, and my sentence got the direction wrong. The reason the allow is right is unchanged (the predicates differ); only the consequence was written backwards.On the counts (KelboLive): your 10 at
21e6bbf4bis right and mine was 15 because I measured it on a tree that already had two more--all-targetsdiagnostics; the body now says what the head measures rather than a number from another tree.I have not touched #2873, which overlaps in three files; my reading of the thread is the same as yours - the two are versions of one change, and this one's comments and allow plus that one's test is the right combination. That is a maintainer's call and I am not going to make it by rebasing over someone else's branch.
Measured at
3e7b0c563:Written with an AI assistant.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
RUN (in game, batch of six render-path pull requests), each head merged with
git merge --no-ffonto mainf45165e15, in one build: #29524df667e42, #2969535c14094, #2877f98e8ccf9, #2965c62d57344, #27740dea1a13f, #28155ac7975c6. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests. A Rust build ran beside the game for part of the run, so the fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; free system memory was low (median 1.1 GB); arrival in the world was driven by keys and not checked on pictures. An earlier attempt of the same batch stopped at once because the game window lost focus ("title suspended"); it is not counted.
AI-assisted (Claude Code).
RUN (independent run on Windows, #2877 head f98e8ccf9, merged locally into
mainf45165e15 withgit merge --no-ff, as part of a batch of six)The in-game run of the batch is already posted on this pull request; this comment is the test side only (no game data, no game files).
Red: no new test; the change is two lint fixes, so the compiler and clippy are the check.
cargo clippy -p leonida-shader --all-targets --locked: 0 warnings here. With the#[allow(clippy::neg_cmp_op_on_partial_ord, clippy::double_comparisons)]line removed: 6 warnings (4 negated partial-ord comparisons, 2 simplifiable binary expressions).cargo clippy -p leonida-gpu --all-targets --locked: 0 warnings here. Withsend_published(&self, mut h: Handoff)as on main:variable does not need to be mutable.Green (whole batch, one tree, Windows 11, debug profile as
d3d12.ymlruns it):cargo test --workspace --exclude xtask --locked: 1708 passed, 0 failed, 75 ignored (leonida-gpu lib 691 / 59 ignored, leonida-shader lib 248 / 2 ignored incl.float_compares_with_nan_on_the_device, leonida app 44, leonida-formats 47, leonida-menu 48, leonida-pe 36).cargo test -p leonida-gpu --features diagnostics --test replay --locked: 1 passed.cargo test -p xtask --locked: 7 passed.texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers,watch::tests::a_write_opens_the_view_it_goes_through,pipeline::make::tests::overlapping_waits_cost_the_frame_its_budget_once); each passes alone, a later full run was 691/0, andmainf45165e15 alone failed the alias_cast test in 2 of 3 runs.Mutations:
mutback on the parameter: killed (1 warning, default features).let h = h;withoutmutunder--features diagnostics: does not compile (E0596 onh.lists, E0594 onh.compare_at), so the#[cfg(feature = "diagnostics")]rebinding is needed.cargo clippy -p leonida-gpu --features diagnosticsstill shows 10 warnings, none insend_publishedor the new code (they predate the batch).Review: no defect. The allows sit on the one test with the NaN reason in its doc comment;
!(a >= b)ora != bwould change what the test asserts, so allowing is right.send_publishedbehaves the same with and withoutdiagnostics; the trailing blank line removal is cosmetic.Not covered: the CI clippy step is
continue-on-error(report only), so nothing blocks these warnings from returning.Verdict: PASS.
AI-assisted (Claude Code).
Code review only, not built (clippy on Windows targets). Ready.
f98e8ccf9, merge base1fff69129, 334 behind currentmain45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.main:fn send_published(&self, mut h: Handoff)is atd3d12/crates/leonida-gpu/src/host.rs:7741.float_compares_with_nan_on_the_devicehas no#[allow].Review:
send_publishedrebindslet mut h = h;under#[cfg(feature = "diagnostics")]. That is the minimal way to havemutonly where the diagnostics code writesh, and release codegen is unchanged.valu_tests.rs, the#[allow(clippy::neg_cmp_op_on_partial_ord, clippy::double_comparisons)]is correct. The negated and double comparisons are the RDNA2 compare semantics under test, and the doc comment explains why clippy's rewrites would change what is asserted with NaN operands.host.rsis incidental.mainis clean, so that is resolved.Verdict: ready.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Esta PR ya no compila sobre el
mainde hoy — y el arreglo es de una línea; ramapr-2877-rebased=f3300751fLo encontré al re-verificar mis PRs sobre
d9b618f10(lo que dije esta mañana que no había hecho):Y el motivo es una interacción, no un conflicto:
send_publisheddeclaralet mut h = h;bajo#[cfg(feature = "diagnostics")](con un comentario que dice que sin la feature nada escribeh, ymutsería un aviso) — y esta PR añadeh.compare/h.compare_aten un bloque que no está bajo esa feature. Sindiagnostics,hno es mutable y no compila.O sea:
mainestaba bien y la PR estaba bien por separado; juntas no. Y un merge limpio no lo detecta, que es justo lo que llevo toda la mañana diciendo.El arreglo, una línea:
mutincondicional: el bloque del compare lo necesita en todas las configuraciones, yallow(unused_mut)mantiene el aviso a raya donde la feature no está y nada escribeh.Verificado:
cargo test -p leonida-gpu --lib→715 passed; 1 failed; 59 ignored, con el1de la iGPU de siempre. Y la ramapr-2877-rebased(f3300751f) lleva la PR más este commit (2 files changed, +9/−2, que es lo que la PR ya hacía más la línea delmut).Lo que no he corrido:
leonida-shader(donde esta PR añadevalu_tests.rs) — son diez minutos y no los he gastado en esta pasada. El arreglo está en la parte que no compilaba, que esleonida-gpu.The host.rs fix is right (
mutis only written underdiagnostics). The#[allow(...)]onfloat_compares_with_nan_on_the_deviceconflicts with #3360, which removes the same two lints by rewriting the arms (0x5 => !nan && a != b,0x9 => nan || a < b, ...) and keeps the semantics. The repository asks to fix rather than allow, so please drop that hunk and let #3360 carry the test fix; as it stands the two pull requests touch the same lines.