glsl: Add ir_unop_f2fmp
authorNeil Roberts <nroberts@igalia.com>
Wed, 9 Oct 2019 11:07:40 +0000 (13:07 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Mar 2020 16:31:08 +0000 (16:31 +0000)
commit1b8edffaa5816449436fac981fd27005fcede8c9
treecdbd0165cc9c8f38dfbaed7f31ed2f65d72c5906
parent5d6b007da8a36254e03e2ae9e83bd3330f528dc8
glsl: Add ir_unop_f2fmp

This is the same as ir_unop_f2f16 except that it comes with a promise
that it is safe to optimise it out if the result is immediately
converted back to float32 again. Normally this would be a lossy
operation but it is safe to do if the conversion was generated as part
of the precision lowering pass.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3929>
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir_expression_operation.py
src/compiler/glsl/ir_validate.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp