GPU: clippy passes on main again #642

Open
coderanonymus wants to merge 1 commit from upstream-pr/642 into main
coderanonymus commented 2026-11-25 03:48:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by coderanonymus on 2026-11-25T03:48:31Z.


Why

CI on main has failed at the first Clippy step since c96b4f2, so the tests haven't run on main since a803c87. 310c6eb fails on three lints:

  • function placed_filler_twins is never used (resource.rs)
  • consider using sort_unstable_by_key (draw.rs)
  • field depth_written is never read (indirect.rs, test build)

What

  • indirect.rs: the timing rig stored the written depth view but only clears it during setup. It draws with depth_tested. The field is dropped. Its heap is still kept alive by _target_heaps.
  • draw.rs: the scissor census sorts by Reverse(count). The order is unchanged.
  • resource.rs: only the diagnostics build's copystat reads placed_filler_twins. It is allowed to be dead without the feature, the same way shadow and pipeline handle theirs.

The resource.rs change is the same as #491 and #530. It's included so that one merge turns CI green. If one of those lands first, this one still merges cleanly or is a trivial conflict.

Verification

  • cargo clippy --workspace --all-targets --locked -- -D warnings and the same with --all-features, targeting x86_64-pc-windows-msvc (cross-checked from Linux): both clean.
  • Not run: cargo test --workspace. It needs Windows, and it hasn't run on main since a803c87. This PR's own CI run will be the first test run in that time.

No game data used.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:6596769631 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/642). Originally posted by [coderanonymus](https://github.com/coderanonymus) on 2026-11-25T03:48:31Z. --- ## Why CI on `main` has failed at the first Clippy step since c96b4f2, so the tests haven't run on `main` since a803c87. 310c6eb fails on three lints: - `function placed_filler_twins is never used` (`resource.rs`) - `consider using sort_unstable_by_key` (`draw.rs`) - `field depth_written is never read` (`indirect.rs`, test build) ## What - `indirect.rs`: the timing rig stored the written depth view but only clears it during setup. It draws with `depth_tested`. The field is dropped. Its heap is still kept alive by `_target_heaps`. - `draw.rs`: the scissor census sorts by `Reverse(count)`. The order is unchanged. - `resource.rs`: only the diagnostics build's `copystat` reads `placed_filler_twins`. It is allowed to be dead without the feature, the same way `shadow` and `pipeline` handle theirs. The `resource.rs` change is the same as #491 and #530. It's included so that one merge turns CI green. If one of those lands first, this one still merges cleanly or is a trivial conflict. ## Verification - `cargo clippy --workspace --all-targets --locked -- -D warnings` and the same with `--all-features`, targeting `x86_64-pc-windows-msvc` (cross-checked from Linux): both clean. - Not run: `cargo test --workspace`. It needs Windows, and it hasn't run on `main` since a803c87. This PR's own CI run will be the first test run in that time. No game data used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chatgpt-codex-connector[bot commented 2026-11-25 04:11:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T03:48:38Z.


Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-25T03:48:35.496059Z
We couldn’t complete this review. Comment @codex review to try again.
3d33ef0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7152262068 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/642#issuecomment-7152262068). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T03:48:38Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"3d33ef0dea7923ff896f4b3073762d406444d7da","has_any_findings":true,"has_unresolved_findings":true,"status":"failed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ❌ Failed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ❌ **Failed** <relative-time datetime="2026-11-25T03:48:35.496059Z">2026-11-25T03:48:35.496059Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `3d33ef0` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot commented 2026-11-25 04:11:22 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T03:48:40Z.


You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7152262465 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/642#issuecomment-7152262465). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T03:48:40Z. --- You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
JRamos1993 commented 2026-11-25 13:06:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by JRamos1993 on 2026-11-25T12:43:16Z.


Five open PRs make clippy pass on main. On current main (9376fd6), three of them do (#642, #755, #841); #530 and #491 (the same commit, d28e0dd) fix one lint of three.

Each PR merged onto 9376fd6, then CI's two clippy steps (cargo clippy --workspace --all-targets [--all-features] --locked -- -D warnings, toolchain 1.98.1, Windows):

tree without features --all-features
main 9376fd6 fails: sort_unstable_by_key (draw.rs), depth_written never read (indirect.rs), placed_filler_twins never used (resource.rs) fails: the first two
+ #642 passes passes
+ #755 passes passes
+ #841 passes passes
+ #530 fails: sort_unstable_by_key, depth_written fails: the same
+ #491 fails: the same fails: the same

The three that pass all make the same sort_unstable_by_key change and differ only in the other two lints:

  • depth_written: #642 and #755 remove the field. #841 keeps it as _depth_written. It is a D3D12_CPU_DESCRIPTOR_HANDLE, plain data, so keeping it holds nothing alive.
  • placed_filler_twins: #642 allows it as dead code without the diagnostics feature. #755 and #841 compile it only with the feature; its one caller is in copystat.rs.

All three merge onto 9376fd6 without conflicts. #530 and #491 are older and fixed what was failing when they were opened. Merging any one of the three passing PRs makes the other four unnecessary.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162762368 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/642#issuecomment-7162762368). Originally posted by [JRamos1993](https://github.com/JRamos1993) on 2026-11-25T12:43:16Z. --- **Five open PRs make clippy pass on `main`. On current `main` (`9376fd6`), three of them do (#642, #755, #841); #530 and #491 (the same commit, `d28e0dd`) fix one lint of three.** Each PR merged onto `9376fd6`, then CI's two clippy steps (`cargo clippy --workspace --all-targets [--all-features] --locked -- -D warnings`, toolchain 1.98.1, Windows): | tree | without features | `--all-features` | |---|---|---| | `main` `9376fd6` | fails: `sort_unstable_by_key` (draw.rs), `depth_written` never read (indirect.rs), `placed_filler_twins` never used (resource.rs) | fails: the first two | | + #642 | passes | passes | | + #755 | passes | passes | | + #841 | passes | passes | | + #530 | fails: `sort_unstable_by_key`, `depth_written` | fails: the same | | + #491 | fails: the same | fails: the same | The three that pass all make the same `sort_unstable_by_key` change and differ only in the other two lints: - **`depth_written`:** #642 and #755 remove the field. #841 keeps it as `_depth_written`. It is a `D3D12_CPU_DESCRIPTOR_HANDLE`, plain data, so keeping it holds nothing alive. - **`placed_filler_twins`:** #642 allows it as dead code without the diagnostics feature. #755 and #841 compile it only with the feature; its one caller is in `copystat.rs`. All three merge onto `9376fd6` without conflicts. #530 and #491 are older and fixed what was failing when they were opened. Merging any one of the three passing PRs makes the other four unnecessary.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/642:upstream-pr/642'
git switch 'upstream-pr/642'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/642'
git switch 'upstream-pr/642'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/642'
git switch 'upstream-pr/642'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/642'
git switch 'main'
git merge --squash 'upstream-pr/642'
git switch 'main'
git merge --ff-only 'upstream-pr/642'
git switch 'main'
git merge 'upstream-pr/642'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!642
No description provided.