#44

airconv: precise min/max for DXBC (IEEE minNum/maxNum semantics)

Open125hzwants to merge intofrom

D3D11's min and max follow IEEE minNum/maxNum: if one operand is NaN the other is returned, and shaders rely on max(0, x) to throw NaNs away. airconv emitted Metal's fast_fmin/fast_fmax, which leave that case undefined, so a NaN from a degenerate normal or 0/0 could reach lighting results.

This emits air.fmin/air.fmax instead (the D3D9 path already does where NaN matters). DXMT_PRECISE_MINMAX=0 restores the fast variants and uses its own shader cache file (_fastminmax suffix); kDXMTShaderCacheVersion goes to 19 so cached fast-variant shaders are not reused. Logged once as [airconv] ml1382 DXBC min/max ....

Motivation: lighting artifacts reported in a 64-bit D3D11 game on DXMT. The fork's builds since 2026-10-15 carry it without regressions; whether it is the fix for that report is not yet confirmed on device, so this is offered as a correctness change with a switch.

🤖 Generated with Claude Code