GPU: round FP16 rectangle corners to even and keep NaN (#245) #315
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by towiice on 2026-11-24T23:30:18Z.
Fixes #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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.