util: implement F16C using inline assembly on x86_64

F16C: https://en.wikipedia.org/wiki/F16C

This also happens to fix bptc-float-modes on llvmpipe.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>
This commit is contained in:
Marek Olšák
2020-09-18 05:21:09 -04:00
parent 4c54f05915
commit ffcdf76799
6 changed files with 84 additions and 19 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ double _mesa_double_mul_rtz(double a, double b);
double _mesa_double_fma_rtz(double a, double b, double c);
float _mesa_float_fma_rtz(float a, float b, float c);
float _mesa_double_to_f32(double x, bool rtz);
uint16_t _mesa_float_to_half_rtz(float x);
uint16_t _mesa_float_to_half_rtz_slow(float x);
#ifdef __cplusplus
} /* extern C */