diff options
| author | Hamza <hamzasherifhassanein@MacBook-Neo.local> | 2026-11-22 14:48:31 +0300 |
|---|---|---|
| committer | Hamza <hamzasherifhassanein@MacBook-Neo.local> | 2026-11-22 14:48:31 +0300 |
| commit | 5c9315d97158a74491daba49cb477ff506e37fc9 (patch) | |
| tree | 99421be4ac03ee9824d9e6fe7a5006d43206d7c1 /runtime/test/tiny_game_exit_code_test.cpp | |
| parent | bb2e18421dac527374eb837c88b5063c5d96f81f (diff) | |
Test tools: turn MoltenVK fast-math off so NaN compares are exact (SHADER-234)
MoltenVK compiles MSL with Metal fast-math on by default, and Metal then folds
an f32 compare of a NaN with itself: v_cmpx_eq/le_f32 on (NaN, NaN) give true
(ps_vcmpx_forms fails on every Mac). The MSL is byte-identical with fast-math
on and off, so it's Metal's compile option, not the translation; "on demand"
(2) doesn't help, 0 does.
runtime/test/vulkan_loader.h, which every Vulkan test program loads MoltenVK
through, now sets MVK_CONFIG_FAST_MATH_ENABLED=0 before loading it unless the
variable is already set. docs/design.md gets a contract row: fast-math off
doesn't remove the optnone NoContraction helpers (the cost part, @Jolymmiles)
and doesn't fix SHADER-182 (same valu_fuzz f16 mismatch either way).
Apple A18 Pro, macOS 26.6.2, MoltenVK 1.4.2: ps_vcmpx_forms 4096/4096 exact;
run_gpu_tests.py 85 pass/52 skip/2 fail -> 86/52/1 native, 114/23/2 ->
115/23/1 with wave64 emulation (the remaining failure is ps_interp_f16_high,
fixed by #1407); ctest 25/25 either way; semantic suite 1220 OK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions