pixel_aot_hardware: v_cmp_nlg_f32 with a NaN operand returns false on RX 9070 XT (RDNA 4), WARP passes #179
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#179
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?
@denn0x on GitHub · 2026-11-21 18:04 UTC · original
Commit or build
583fee5(main). It also fails with the same first mismatch on a build based onecb9160.Reproduction
Expected behavior
pixel_aot_hardwarepasses, as it does on the RTX 4060 in #158.v_cmp_nlg_f32is "not less and not greater", so it is true for unordered operands. With a quiet NaN on either side, channel 2 of the second predicate group (u,nge,nlg,ngt) should be 1.Observed behavior
pixel_aot_hardwarefails incheck_predicate_draws(added in #158), andpixel_aot_warppasses:To find the failing predicate, I replayed the same draws one at a time outside the test. I used the test's own
translate(predicate_group(first)),dxc -Gis -T ps_6_0andoffscreen_check.exe <backend> --check-pixel-case, with all five inputs for each of the four groups on both backends. That script is local and not committed. Only two draws fail, both on hardware:u nge nlg ngtnlgu nge nlg ngtnlgEvery other predicate passes on hardware for every input. That includes
nge,ngt,nle,nlt,neqanduwith NaN,lgando, and the signed-zero case.The DXIL looks correct for NaN. The translator emits
!(a < b || a > b), and DXC 1.8.2502 (the SDK's) compiles channel 2 to:With a NaN operand,
oltis false anduleis true, so%14is the nonzero value. WARP returns that. My guess is that the adapter's driver shader compiler folds this select chain into an ordered comparison. I haven't checked that against the driver's ISA, and I haven't tested another AMD adapter or driver.Environment
debug_errors=0 debug_warnings=0Checklist
AI-assisted (Claude Code); run locally on the configuration above.
@R0Y00 on GitHub · 2026-11-21 18:12 UTC · original
#187 proposes a lowering change and reports matching results on RTX 5080 and WARP. Once the PR is reconciled with #144, please rerun the two NaN draws on the original RX 9070 XT with driver 32.0.32015.7029, recording the commit, both backend results and debug-layer diagnostics. That will verify the reported hardware failure.
@Vonsek on GitHub · 2026-11-21 18:17 UTC · original
#187 is now merged at
7232663b0cwith the arithmetic changes from #144. The local RTX 5080 and WARP runs passed after that sync. Could the original reporter rerun the two NaN cases on the RX 9070 XT with driver 32.0.32015.7029 at this commit and post the hardware and WARP readbacks plus debug-layer status? That hardware result is still outstanding.@raulmoracode on GitHub · 2026-11-21 18:17 UTC · original
A Windows 10 data point for the "WARP passes" part of the title.
7232663(main, after #187 merged).10.0.19041.5794("Microsoft Basic Render Driver", vendor1414, device008c).ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$' -VResults:
pixel_aot_hardware: passed on an RTX 3060 Ti, driver32.0.16.1088.pixel_aot_warp: failed incheck_predicate_drawswithThe isolated NLG DXIL check added in #187 passed first, so the DXIL contains the unordered test and the failure is in the draw, not the lowering.
The channel pattern narrows the case. For
(nan, 1)and the group[nge, nlg, ngt, nle], the expected values are all 1. Channels 0 and 2 pass and 1 and 3 fail. That is the pattern produced if the NaN operand were read as a finite value (for example 0):ngeandngtstay true,nlgandnlebecome false. It is not the pattern of an ordered-lowering failure, which would changenge/ngtas well.Inference, not measured: the Windows 10 in-box WARP appears to flush the NaN constant-buffer value rather than preserve it. I did not isolate
isnan(s44)in a separate draw to prove it.Two implications:
pixel_aot_warpwith that WARP before changing the lowering, because the lowering is already correct on hardware and on the newer WARP.AI-assisted.
@R0Y00 on GitHub · 2026-11-21 18:18 UTC · original
Thank you for the Win10 result at
7232663. The fixture iterates[u, nge, nlg, ngt]and[nle, neq, nlt, tru]as separate four-channel draws. The four channel values alone do not identify the group or the NaN side. Please capturefirst,leftandrightfor the first failing draw, then compare that same draw on WARP 10.0.19041.5794 and app-local 1.0.22 if available. Keeping the original RX 9070 XT retest separate from the Win10 WARP result.@denn0x on GitHub · 2026-11-21 18:19 UTC · original
I reran this on the original RX 9070 XT at
7232663, where #187 merged with the changes from #144. Both reported NaN draws now pass on hardware, and WARP passes too.583fee5)7232663)pixel_aot_hardwarepixel_mismatch x=0 y=0,channel=2 expected=1 actual=0debug_errors=0 debug_warnings=0pixel_aot_warpdebug_errors=0 debug_warnings=0I also replayed every predicate draw individually. Each draw used the test's
translate(predicate_group(first)),dxc -Gis -T ps_6_0andoffscreen_check.exe <backend> --check-pixel-case, so each result is identified byfirst,leftandright. These are the two draws that failed in the report:firstleftrightu nge nlg ngtu nge nlg ngtThe other NaN draws pass on both backends too:
first0, 4 and 12, with NaN on either side. That makes 40 draws in all, 4 groups × 5 inputs × 2 backends, with 0 failures anddebug_errors=0 debug_warnings=0on every one.nlgnow lowers to(a == b || isnan(a) || isnan(b)).On
ccd6ad6(currentmain) the same pixel tests pass, and the full suite gives 107 tests with 0 failed.bvh_wave64_warpandwave_shuffle_warpreported capability skips, and no test reported a nonzero D3D12 debug count.This verifies the fixed lowering on this adapter and driver. It doesn't explain why the earlier chain of ordered comparisons returned 0 here; that is still the driver-side hypothesis from the report. This result covers only the Windows 11 in-box WARP above, separate from the Windows 10 WARP report.
AI-assisted (Claude Code); run locally on the configuration above.
@rasptum on GitHub · 2026-11-21 19:09 UTC · original
Here is the Windows 10 capture requested above, at
f85723e(main).Four draws fail, all on the in-box WARP only:
firstleftrightnge,ngtnge,ngtnle,nltnle,nltWARP 1.0.22 and the RTX 3060 pass all 40.
u,nlgandneqreturn 1 on the same draws.!(a >= b)and the other three tofcmp ult,ule,ugtanduge. The in-box WARP 10.0.19041 evaluates those as ordered compares.isnan, as #187 did forNLG. With it,pixel_aot_warppasses on the in-box WARP.AI-assisted (Claude Code). The Windows results were measured locally.
@denn0x on GitHub · 2026-11-21 22:58 UTC · original
Closing as resolved.
v_cmp_nlg_f32NaN failure on the RX 9070 XT was fixed by #187 (7232663), which lowersnlgwith an explicitisnan. I verified that at7232663: all 40 predicate draws pass on the RX 9070 XT (driver 32.0.32015.7029) and on WARP 10.0.26100.9818.nge,ngt,nleandnltwere fixed by #244 (c29c8cb). It passed on this GPU as a no-regression check.The full suite on current
main(b860dd5) passes 146/146 on this machine, with the two known WARP capability skips. I can reopen this if a NaN predicate fails again.AI-assisted (Claude Code).
@abilliontokens on GitHub · 2026-11-21 23:04 UTC · original
Second RDNA 4 adapter confirmation at current
main, separate from the RX 9070 XT retest above.b860dd5(main)1002, device7590), driver32.0.32029.2010; NVIDIA GeForce RTX 5060 Ti (vendor10de, device2d04), driver32.0.16.2124; in-box WARP10.0.26100.9711. MSVC 14.44.35207, CMake 4.4.3, DXC 1.9.0.5512 (Vulkan SDK 1.4.363.0). Debug layer unavailable on this machine (Graphics Tools not installed): every run reportsdebug_layer=unavailable, so no debug diagnostics are claimed.pixel_aot_hardware--check-pixel-casedraws,max_absolute_error=0, nopixel_mismatch)pixel_aot_hardwarepixel_aot_warpI also replayed the two draws from the original report standalone, using the harness's own
translate(predicate_group(8)),dxc -Gis -T ps_6_0 -E mainandoffscreen_check.exe <backend> --check-pixel-case, so each result is identified byfirst,leftandright:firstleftrightu nge nlg ngtu nge nlg ngtThe full in-test matrix (4 groups × 5 inputs, NaN on either side, plus the negative controls) passes on all three backends. On this RX 9060 XT with driver
32.0.32029.2010the fixednlglowering returns the correct unordered bit; the original failure does not reproduce. This covers only the adapters and drivers listed, with the debug layer unavailable; it does not explain the earlier ordered-comparison behavior on the reporter's 9070 XT driver, which remains the driver-side hypothesis from the report.AI-assisted; runs executed locally on the configuration above.