Skip to content

Diagnostics-only barrier stats: six needless borrows the all-features gate refuses - #3086

Open
TheSovietWaffle wants to merge 1 commit into
trustno1-coder:mainfrom
TheSovietWaffle:fix/diagnostics-gate
Open

TheSovietWaffle wants to merge 1 commit into
trustno1-coder:mainfrom
TheSovietWaffle:fix/diagnostics-gate

Conversation

@TheSovietWaffle

@TheSovietWaffle TheSovietWaffle commented Nov 29, 2026 •

Copy link
Copy Markdown

The build half of this is in main now (41adb55, "Diagnostics build compiles again"): the mb helper in log_heap_elsewhere and self::timing() at the three submission sites. What is left is the second gate: with the diagnostics feature on, clippy -D warnings refuses six barstat::rb calls that pass a reference to an already-borrowed list.

What it changes

Six diagnostics-only barrier-stat calls pass the list they already have:

  • crates/victory-gpu/src/host.rs: two crate::barstat::rb(&list, …) in the read-back capture.
  • crates/victory-gpu/src/compose.rs: four rb(&l, …) / rb(&cmds, …) in the display-plane tests.

barstat::rb takes &ID3D12GraphicsCommandList, so the extra & is a reference to a reference; clippy::needless_borrows refuses it under -D warnings. They sit behind feature = "diagnostics", so no earlier lint run could see them: the plain Clippy step never compiles them, and the --all-features step never ran while the build was broken.

How it was tested

  • cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings: the six errors before, none after. The one remaining needless_borrows in that run is crates/victory-gpu/src/list.rs:2692 (handles), which is not a barstat call and not touched here.
  • cargo check -p victory-gpu --tests --profile diag --features diagnostics: Finished (with 41adb55 in the base).
  • No title, GPU profile or game data is involved; the change is six & removals in diagnostics-only code.

Checked for overlap

@TheSovietWaffle TheSovietWaffle changed the title Diagnostics build: mb at module scope, and the stage spans stop hiding timing() [pr-fix] Diagnostics-only barrier stats: six needless borrows the all-features gate refuses Nov 30, 2026
@github-actions github-actions Bot changed the title [pr-fix] Diagnostics-only barrier stats: six needless borrows the all-features gate refuses Diagnostics-only barrier stats: six needless borrows the all-features gate refuses Nov 30, 2026
moritz-eckhard-nickel added a commit to moritz-eckhard-nickel/VIctory-NVIDIA that referenced this pull request Nov 30, 2026
…: six needless borrows the all-features gate refuses)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull request: fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant