spirv: set medium precision with RelaxedPrecision decorator

This allows the variables decorated with RelaxedPrecision to have the
proper precision. It is worth to note that the decorator can be
applied on other cases, but those would be handled on the future.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7614>
This commit is contained in:
Alejandro Piñeiro 2020-11-08 00:06:14 +01:00 committed by Marge Bot
parent 476dc3c050
commit 86111fdc9c
1 changed files with 2 additions and 1 deletions

View File

@ -1136,7 +1136,8 @@ apply_var_decoration(struct vtn_builder *b,
{
switch (dec->decoration) {
case SpvDecorationRelaxedPrecision:
break; /* FIXME: Do nothing with this for now. */
var_data->precision = GLSL_PRECISION_MEDIUM;
break;
case SpvDecorationNoPerspective:
var_data->interpolation = INTERP_MODE_NOPERSPECTIVE;
break;