spirv_to_nir: Cast RelaxedPrecision ALU op dests to mediump.
authorEmma Anholt <emma@anholt.net>
Tue, 26 Apr 2022 23:29:04 +0000 (16:29 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 May 2022 19:43:36 +0000 (19:43 +0000)
commit260559050afc11b50e05209203bc7e77bd42bcfe
tree6971416ba14b870e00cc308bb4320c385e48bce1
parent87d74311985257dd9bbef15f9010c9fe9f64c84c
spirv_to_nir: Cast RelaxedPrecision ALU op dests to mediump.

This is controlled by spirv_to_nir_options.relaxed_precision_alu, because
some drivers don't want it.

This gets us mostly 16-bit math on turnip in vk-5-normal.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16465>
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/vtn_alu.c
src/compiler/spirv/vtn_glsl450.c
src/compiler/spirv/vtn_private.h