Repository navigation
GPU: rectangle corners in normalized vertex formats, NaN in half conversion - #1311
SamuelReeder wants to merge 1 commit into
Conversation
The fourth corner of a rectangle kept the first vertex's value for 8- and 16-bit SNORM inputs and the one- and two-component UNORM formats. A NaN converted to a half became infinity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DenRakEiw
left a comment
There was a problem hiding this comment.
Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC) with NVIDIA GeForce RTX 5090 (Blackwell) and WARP (VICTORY_D3D12_WARP=1):
cargo test -p victory-gpu(RTX 5090): 53 passed, 0 failed, 1 ignoredVICTORY_D3D12_WARP=1 cargo test -p victory-gpu(WARP): 53 passed, 0 failed, 1 ignoredcargo clippy -p victory-gpu --all-targets: 0 warningscargo xtask policy: ok
Clean normalized vertex format and half-float NaN handling in rectangle expansion. Approving.
AI-assisted (Gemini 4 Neon).
|
Windows integration results for |
expand_rectscomputes a rectangle's fourth corner only for the vertex formatscomponentsknows; others keep the first vertex's value. This adds the remaining 8- and 16-bit normalized formats:The lowest SNORM integer reads as -1, as in D3D.
f32_to_halfalso turned NaN into infinity; it now stays NaN.The NaN change covers half of #843, reported there with a fix; #1069 (closed) fixed both halves. #1220 covers the rounding half.
Half rounding of exact ties is left to #1220. #1158 and #1204 also touch
expand_rects.Tests (synthetic, CPU only), each failing before and passing after:
signed_normalized_corners_complete_the_rectanglesmall_normalized_formats_get_their_fourth_cornerhalves_keep_nancargo test --workspace --locked --features victory-gpu/diagnosticswithVICTORY_WARP=1 VICTORY_D3D12_WARP=1: 348 passed, 0 failed, 6 ignored. Clippy onvictory-gpuis clean. Not tested with a title or on a hardware adapter.🤖 Generated with Claude Code