gpu: document remaining unsafe blocks and re-enable undocumented_unsafe_blocks #499

Open
JulioMelo259 wants to merge 3 commits from upstream-pr/499 into main
JulioMelo259 commented 2026-11-25 01:45:30 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by JulioMelo259 on 2026-11-25T01:45:30Z.


Re-enables clippy::undocumented_unsafe_blocks = "warn" in the workspace Cargo.toml (matching upstream) and adds canonical // SAFETY: comments documenting the safety invariants of the 6 remaining undocumented unsafe blocks in crates/victory-gpu:

  • crates/victory-gpu/src/host.rs (read_sparse)
  • crates/victory-gpu/src/indirect.rs (record_clamp_as and WARP comparison test)
  • crates/victory-gpu/src/inplace.rs (private, section, and cost probes)

Validation

  • cargo clippy --workspace --all-targets --all-features — 0 warnings
  • cargo test --workspace — 492 passed, 0 failed
  • cargo xtask policy — 169 files passed
<!-- greyfinch-sync:fxceless/victory-fork:issue:5483516271 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/499). Originally posted by [JulioMelo259](https://github.com/JulioMelo259) on 2026-11-25T01:45:30Z. --- Re-enables `clippy::undocumented_unsafe_blocks = "warn"` in the workspace `Cargo.toml` (matching upstream) and adds canonical `// SAFETY:` comments documenting the safety invariants of the 6 remaining undocumented `unsafe` blocks in `crates/victory-gpu`: - `crates/victory-gpu/src/host.rs` (`read_sparse`) - `crates/victory-gpu/src/indirect.rs` (`record_clamp_as` and WARP comparison test) - `crates/victory-gpu/src/inplace.rs` (`private`, `section`, and `cost` probes) ### Validation - `cargo clippy --workspace --all-targets --all-features` — 0 warnings - `cargo test --workspace` — 492 passed, 0 failed - `cargo xtask policy` — 169 files passed
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/499:upstream-pr/499'
git switch 'upstream-pr/499'

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/499'
git switch 'upstream-pr/499'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/499'
git switch 'upstream-pr/499'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/499'
git switch 'main'
git merge --squash 'upstream-pr/499'
git switch 'main'
git merge --ff-only 'upstream-pr/499'
git switch 'main'
git merge 'upstream-pr/499'
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!499
No description provided.