fix(shader): keep the NaN case explicit for NGE, NGT, NLE and NLT #241
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/244"
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 R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-21T19:09:07Z.
Change
pixel_aot_warpfails on the Windows 10 in-box WARP (10.0.19041) incheck_predicate_draws. This is the independent problem behind the Windows 10 result discussed in #179.NGE,NGT,NLEandNLTwere lowered as!(a >= b)and similar. DXC compiles each to one unordered relational compare (fcmp ult,ule,ugt,uge). The in-box WARP 10.0.19041 evaluates those as their ordered forms, so the four predicates return false for a NaN operand.This PR lowers them the way #187 lowered
NLG: the ordered relation, or an explicitisnanon either operand. The shared interface it touches is theCOMPAREtable intools/pixel_aot.py. No open PR changes those entries.Refs #179.
Verification
Commit
41669e2onmainf85723e. Windows 10 22H2 build 19045.6466, RTX 3060, SDK DXC 1.7.2308, D3D12 debug layer on.pixel_aot_warpandpixel_aot_hardwarepass. Onmain,pixel_aot_warpfails.bvh_wave64_warpandwave_shuffle_warp(#145), unrelated to this PR.main.I also replayed all 40 predicate draws (4 groups x 5 inputs) per backend without stopping at the first failure. On
main, these are the only failing draws:firstleftrightnge,ngtnge,ngtnle,nltnle,nltThe same four fail with DXC 1.8.2502 and 1.9.2609. With this change, all 40 draws pass on all three backends with all three compilers.
Evidence and follow-up
NLGnow covers all five negated relations, and the control that checked the oldNLTspelling checks the new one.u,nlgandneqpass on the failing draws, sofcmp unoandfcmp uneare evaluated correctly. Only the four unordered relational compares are not.Checklist
AI-assisted (Claude Code). The Windows results were measured locally.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-21T19:13:57Z.
No-regression check at
41669e2on the RX 9070 XT where #179 was first seen. This machine does not reproduce the Windows 10 failure:mainalready passes all 40 predicate draws here on hardware and on in-box WARP 10.0.26100. So this shows the new lowering keeps RDNA 4 and current WARP correct; it does not confirm the fix itself.Environment: Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled on both backends.
Full suite:
ctest --preset dev --no-tests=errorgives 116 passed, 0 failed.bvh_wave64_warpandwave_shuffle_warpreported capability skips, as onmain.AI-assisted (Claude Code).