spirv: handle phis decorated with RelaxedPrecision
authorDaniel Schürmann <daniel@schuermann.dev>
Fri, 3 Jun 2022 12:00:11 +0000 (14:00 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Jul 2022 21:58:01 +0000 (21:58 +0000)
commit6f25d45877a1e1a7ac6250a7d051d33485e0cba7
treedfbfb68267429e07bacd0608c21215d6d15a4d29
parentcde8c92ab6d90b729eace99626045f635deb30cd
spirv: handle phis decorated with RelaxedPrecision

If the driver can do 16-bit ALU ops, then store RelaxedPrecision phi
values into 16-bit NIR variables with downconverts/upconverts on the way
in/out.

This has no impact on shader-db on freedreno (not that we have a ton of
GLES content there), but it does cause an ANGLE-translated CTS shader on
vulkan to get consistent conversions between two copies of a value, and
avoid a test bug.

Reviewed-by: Emma Anholt <emma@anholt.net>
Closes: #6585
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14018>
src/compiler/spirv/vtn_cfg.c