glsl/lower_instructions: Use float16 constants when appropriate
authorNeil Roberts <nroberts@igalia.com>
Sun, 26 May 2019 13:32:49 +0000 (15:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 9 Mar 2020 16:31:08 +0000 (16:31 +0000)
commit6c1c2b779abfda8c7271240f24e92cb6970106a3
tree219d37aff2a60f736bb528ea5f66331c31be7c92
parent2b39bb4fc05638c6c250e9b79c5c8dcf7361229c
glsl/lower_instructions: Use float16 constants when appropriate

When lowering instructions that involve floating-point constants, pick
the appropriate type for the constant so that it will also work with
float16 parameters.

v2: Use float16_t constructor instead of helper function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3929>
src/compiler/glsl/lower_instructions.cpp