Mesa (main): spirv: set medium precision with RelaxedPrecision decorator
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 29 04:10:14 UTC 2021
Module: Mesa
Branch: main
Commit: 86111fdc9c87d0736a7b7be7e390be2080b0d5db
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=86111fdc9c87d0736a7b7be7e390be2080b0d5db
Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date: Sun Nov 8 00:06:14 2020 +0100
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 at jlekstrand.net>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7614>
---
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;
More information about the mesa-commit
mailing list