Direct DXIL v_fract_f32 can return 1.0 for tiny negative inputs #3285
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#3285
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?
@wish131400 on GitHub · 2026-11-28 05:15 UTC · original
The direct DXIL frontend's
v_fract_f32lowering still emits only DXILFrc, so tiny negative inputs can produce exactly 1.0. The earlier Python paths were corrected in #267 and #2010; this report concerns the newly added native direct frontend.At base
240e0fb9c460f24d51683abe2d4cce2800b136c1, a source-built gfx1013 request gives:0xb0800000(-2^-30)0x3f800000(1.0)0x3f7fffff0xb1800000(-2^-28)0x3f800000(1.0)0x3f7fffffmul:2output modifier0x40000000(2.0)0x3fffffffThe synthetic fixture covers eight inputs and four forms (VOP1, VOP3 source negation, clamp and
mul:2) across two wave32 groups. The original frontend differs on 384 of 2,064 output/guard words. A finite cap must run before output modifiers, and must use an ordered comparison so NaN remains NaN. No console hardware result is claimed; the expected bound is the project's existing gfx1013 contract.Environment: Windows 10 build 19045, NVIDIA GeForce RTX 4070 Ti SUPER, driver 32.0.15.7270, DXC 1.9.2609, Agility 1.620.2. D3D12 debug layer disabled for compute readback. The ordinary Windows 10 fixture executable skips for the SM6.6 requirement; the measured test executable was locally linked with the matching Agility version/path exports and existing runtime. No game bytes, SDK sources or redistributables are included in the fixture.
An accompanying focused PR will add
tests/native_fract_f32_check.pywith compile/negative controls and hardware readback, so the mismatch can be reproduced without game assets.@wish131400 on GitHub · 2026-11-28 05:18 UTC · original
The source-built regression and focused correction are available in #3287. The PR records the original 384-word mismatch, fixed hardware readback, and the Windows 10/Agility capability boundary.