summaryrefslogtreecommitdiffstats
path: root/src/util/double.c
Commit message (Collapse)AuthorAgeFilesLines
* util: add fp64 -> fp32 conversion support for RTNE and RTZ rounding modesSamuel Iglesias Gonsálvez2019-09-171-0/+38
In order to be coherent with the pre-existent API for half floats, this new API for double is the one meant to be used when doing double to float conversions. It is no more than a wrapper for the softfloat.h API but we meant to keep that one private. v2: - Fix bug in _mesa_double_to_float_rtz() in the inf/nan detection using the exponent value. v3: - Replace custom f64 -> f32 implementations with the softfloat one (Andres). v4: - Added API usage clarifying comments (Caio). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>