Skip to content

CL: Math fixes

Boris Brezillon requested to merge ms/cl-math-fixes into msclc-d3d12

Should fix errors reported by the bruteforce test.

You'll need https://gitlab.freedesktop.org/bbrezillon/llvm-project/-/tree/10.x-libclc-windows-dxil to test.

v2:

  • Followed @daniels suggestion to use a __builtin and let vtn tweak the value of __builtin_hw_has_fma32 based on the ->lower_fma flag. This way we should always end up with an optimize version of the sincos helpers
  • Use clc implementation as a fallback when the NIR implementation is not precise enough (decision based on the ->lower_xxx flags)
  • Fix nextafter() for platforms that don't support denorms

/cc @jenatali @daniels

Edited by Boris Brezillon

Merge request reports