glsl: lower mediump temporaries to 16 bits except structures (v2)
authorMarek Olšák <marek.olsak@amd.com>
Wed, 24 Jun 2020 12:09:48 +0000 (08:09 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 8 Jul 2020 02:02:06 +0000 (22:02 -0400)
commit6aea39641a6c32f780c40e3344096d3e0eccb590
tree658f3ff6fab47884ad61637560d2488a6a0a5a6a
parent7f00d4dac813836d9767efa381c43514b2a999cc
glsl: lower mediump temporaries to 16 bits except structures (v2)

Without this, NIR contains non-lowerable 32-bit phis for mediump variables.

Structures are not lowered yet.

v2: add the LowerPrecisionTemporaries option

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
src/compiler/glsl/lower_precision.cpp
src/compiler/glsl/standalone.cpp
src/compiler/glsl/tests/lower_precision_test.py
src/mesa/main/mtypes.h