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>
This commit is contained in:
Marek Olšák
2020-06-24 08:09:48 -04:00
parent 7f00d4dac8
commit 6aea39641a
4 changed files with 1028 additions and 2 deletions

View File

@@ -441,6 +441,7 @@ standalone_compile_shader(const struct standalone_options *_options,
options->LowerPrecisionFloat16 = true;
options->LowerPrecisionInt16 = true;
options->LowerPrecisionDerivatives = true;
options->LowerPrecisionTemporaries = true;
}
}