GPU: round FP16 rectangle corners to even and keep NaN (#245) #315
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!315
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-315"
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?
@towiice on GitHub · 2026-11-24 23:30 UTC · original
towiice:fix/rect-fp16-rounding-nan→main· +27 −3 · 1 files · 1 commits · openFixes #245. In the CPU rectangle expansion,
f32_to_halfrounded exact ties up in the normal range and turned NaN into infinity. Ties now go to the even mantissa, as the subnormal path already does, and NaN becomes a quiet NaN with the same sign (the payload is not kept).Tested (
2119b0e+ this change; GTX 1650 SUPER, Windows 11, Rust 1.98.1 gnullvm):expand_rectsand covers a tie rounding down, a tie rounding up, NaN and ±infinity. It fails without the fix; the NaN check also fails when only the NaN fix is removed.cargo test --workspace --locked --no-fail-fast: 496 passed, 1 failed, 7 ignored. The failure isload_probe: building its fixture fails to link on gnullvm (/DELAYLOAD); this PR does not touch it.--all-targets -D warnings) passes, andrustfmt --checkpasses on the changed file.Not tested: MSVC build, the all-features Clippy run, running a game.
AI use: written and tested with Claude Code.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.