pixel_aot: a native RDNA 2 reference for v_cvt_rpi/flr_i32_f32 exceptional inputs (NaN, ±inf, overflow) #1772
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1772
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@KainanP on GitHub · 2026-11-24 18:18 UTC · original
tools/pixel_aot.pyrequire_proven_i32_f32_rangerefuses unproven runtime inputs tov_cvt_rpi_i32_f32/v_cvt_flr_i32_f32"until a native RDNA reference establishes exceptional behavior". Here is one, so this can be decided:rpiandflrgive0x7FFFFFFFfor a positive NaN and0x80000000for a negative one, quiet or signalling.v_cvt_i32_f32/v_cvt_u32_f32give 0.rpiis the floor of the exact x + 0.5, so 0.49999997 → 0. Thecvt_rpi_i32_f32helper inpixel_aot(f + ((x - f) >= 0.5f)) already matches this.int(f + ...)/int(floor(x))of a NaN or out-of-range value is an undefined HLSL cast. A sign-bit select for NaN plus a clamp would make the result defined. xcl-dev/xcl#1020 is a worked example.Caveat: gfx1036 is a desktop RDNA 2 APU, not gfx1013 or Scarlett. This is the same kind of evidence #540 asked for, but not from the console itself.
AI-assisted (Claude Code).