nir: Extend nir_lower_int64() to support i2f/f2i lowering
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 19 Jun 2020 15:28:09 +0000 (17:28 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jul 2020 16:54:24 +0000 (16:54 +0000)
commit936c58c8fcceee086d3c492712595555afe82266
tree60770ba49f3ef5653bebe4a72bbb21032f72345d
parentbfee35b45cc9fdf84ac7a613cf180d3c681cbb46
nir: Extend nir_lower_int64() to support i2f/f2i lowering

That's an attempt at replacing the complex __int64_to_float() and
__float_to_int64() implementations found in float64.glsl by a simpler
native NIR equivalent.

Thanks to that, we can have lower those conversion without having to
compile a GLSL shader, which would be quite annoying for OpenCL
kernels.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5588>
src/compiler/nir/nir_lower_int64.c