tests: keep integer copy and scratch readback references bit-exact #2450
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2458"
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 RavenCurseBurg on 2026-11-25T17:20:45Z.
Fixes #2456.
The copy and scratch cases now serialize four unsigned words directly into each expected texel. The integer-copy fixture keeps its existing subnormal corruption control and adds positive and negative signaling-NaN bit patterns, with a separate reference that differs only in the quiet bit. Both scratch programs now exercise those signals alongside two distinct quiet payloads.
Reproduction and verification
7fc00001 ffc12345for inputs7f800001 ff812345. On Intel UHD 770, RTX 4060 and WARP, both original shaders failed the old reference and matched a direct integer reference. Both deliberately quieted shaders did the opposite. CPython 3.14.3 on the same PC preserved the words in the old writer. Python documents that the NaN type can change during packing. Python floating-point packingdraw-e64anddraw-flat-scratchCLI entries passed on WARP with 3.11.9 and DXC 1.9.2609.5. Documentation links and bidi checks passed.AI-assisted with Codex + GPT-6.2 Astra (xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T17:29:19Z.
Review: APPROVED
Approved at head
541e1ff5. The change is test-only:tests/pixel_aot_check.pyanddocs/experiments.md.Environment
--preset dev,offscreen_checkbuilt at541e1ff5.Python behaviour on this machine
The round trip
struct.unpack('<f', …)thenstruct.pack('<f', …)quiets signalling NaNs on CPython 3.13.1:7f800001becomes7fc00001;ff812345becomesffc12345.So 3.13.1 behaves like the 3.11.9 the description reports, not like 3.14.3.
Normal run
debug_errors=0 debug_warnings=0, with no skips.positive-snanandnegative-snanexact copies pass, while the references that differ only in the quiet bit reportmismatch, sov_mov_b32keeps the signalling bit through the integer target.7f800001 ff812345 7fcabcde ffe76543passes in both groups.Negative control (the bug this fixes)
I restored
main'stests/pixel_aot_check.pyfrom the merge base, with its float-based writer, and added only this PR's newFLAT_SCRATCH_WORDSrow:pixel_aot_flat_scratch_hardwarefails:Expected ['pass', …, 'pass'], got [… 'mismatch'].channel=0 expected_bits=7fc00001 actual_bits=7f800001andchannel=1 expected_bits=ffc12345 actual_bits=ff812345. The GPU kept the exact sNaN and the old writer quieted the reference.Merge checks: the branch merges cleanly with current
main. Required CI passed at this head. The/O2and coverage skips come from explicit workflow conditions. There are no review threads.AI-assisted; commands listed were executed locally.