Files
metal2vulkan/docs
Anees Iqbal 822263b1b7 Hold the precise trig at NaN operands to what its stage records
The owned fixture precise-trigonometric-functions-at-nan-operands-under-fast-math
calls precise sin, cos, tan and sincos in a fast-math entry. MoltenVK compiles
an entry in one math mode, so those precise calls take their fast forms. On
the Apple M3 Max through MoltenVK 1.4.2, sin, cos and sincos of a NaN answer 0
(and other words keep payloads such as ffc00000 or 7fc12345) where Metal
answers 7fc00000. The live stage already records
PrecisionNote::DeviceTranscendentals and NativeNanEncoding, and the runtime
announces both. Apple states no answer at a NaN operand under fast math. The
test, though, held every NaN word to Metal's canonical NaN on a profile with
MetalCanonicalNans.

What changed:
- owned_float_fixtures_answer_metal takes the case's notes. A NaN word's bits
  are the device's where the stage records NativeNanEncoding. A function's
  answer word (not the operand word, DFL_TRIG_OPERAND) may be a number where
  it records DeviceTranscendentals.
- Each note the answers needed must be recorded. Every recorded note must be
  announced, checked once over the test's notices, so a once-per-device
  announcement is not lost between cases.
- DeviceTranscendentals' doc (pipeline/artifact.rs) and its docs/API.md entry
  now say that a NaN operand may answer a number in such an entry.

No note is added: the stage recorded both before the change.

Verified: runtime_lane::driver_deviations::owned_float_fixtures_answer_metal
passes on the Apple M3 Max through MoltenVK 1.4.2 (--cfg m2v_gpu), together
with the next commit's minimum rows.

(cherry picked from commit 91f122b133c93af4b155a258d088e0001ff55a72)
(cherry picked from commit 54a9b15a1fe0a27e8bf9d2a3a236813b9c117347)
2026-11-03 02:03:16 -08:00
..