upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/xma_decoder/tests/ffi_cpp_smoke.cpp
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-30 12:39:08 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-30 12:39:08 -0500
commita4fcebbf1d8c2ab06b0ed7124084feca4873162d (patch)
tree87282a44b9b6c0af66861527715cdfe14aac73de /runtime/xma_decoder/tests/ffi_cpp_smoke.cpp
parent12b3740a1503a03b74cdb62029ae893bc1be2a45 (diff)
Shader translator: float compares and the NaN scrubs tell a NaN by its bits (LEONIDA_NAN_EXACT, on)
The NVIDIA driver compiles DXIL under fast math and may fold a float compare's NaN case away. The title's NaN guards are such compares (v_cmp_u_f32 x, x; v_cmp_neq_f32 x, x), lowered to fcmp uno / une; a NaN that passes one reaches the temporal filters, where it spreads as black blocks that grow frame by frame. Every v_cmp_*_f32 / _f16 but f and tru now tests both operands with the integer check is_nan_f32 already used (|x| > the bits of infinity): ordered compares are the ordered compare and no NaN, unordered ones the ordered compare of their sense or a NaN, o and u the NaN test itself, so no unordered fcmp is left. The NaN of v_cvt_u16_f16 / v_cvt_i16_f16 is found the same way, and so are the NaN and infinity tests of the scrub of colours and image stores (LEONIDA_NAN_SCRUB), which were unordered compares too. LEONIDA_NAN_EXACT=0: as before. The shader cache keys on the switch (translation_fingerprint). Ported from voidopcode/vilocity 598050b (INFIERNOXIII, GPL-3.0-or-later; after the Whiplash-NVIDIA team's nan_exact), written into Leonida's lower.rs; the scrubs are ours. Test: float_compares_with_nan_on_the_device (the fourteen compares other than f and tru against quiet, signalling and negative NaNs, infinities and signed zeros, on the RTX 4060 Ti and WARP; f and tru are left out: WARP's device is removed at a dispatch of an fcmp false). The existing NaN tests (v_cmp_lg, med3, the 16-bit conversions, the scrub's integer bits, division fixup) pass with the switch on. docs/switches.md made again. AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64) and WARP: the named tests above. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder/tests/ffi_cpp_smoke.cpp')
0 files changed, 0 insertions, 0 deletions