From 86111fdc9c87d0736a7b7be7e390be2080b0d5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Sun, 8 Nov 2020 00:06:14 +0100 Subject: [PATCH] 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 Reviewed-by: Iago Toral Quiroga Part-of: --- src/compiler/spirv/vtn_variables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 8423434e1c7..d281061a31f 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -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;