Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> --- src/compiler/glsl/lower_mediump.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/src/compiler/glsl/lower_mediump.cpp b/src/compiler/glsl/lower_mediump.cpp index bae18c9bfb..73b8aa577c 100644 --- a/src/compiler/glsl/lower_mediump.cpp +++ b/src/compiler/glsl/lower_mediump.cpp @@ -184,6 +184,17 @@ lower_mediump_visitor::can_be_lowered(const ir_variable *var) const var->data.how_declared == ir_var_declared_implicitly) return true; + /* Such as builtins, temporary variables don't have have precision + * qualifiers either. Lower them by default. + * + * TODO: Surrounding expressions should really be examined to tell if + * full precision needed. Moreover, these can be referred from + * multiple locations. If any requires full precision, then all + * expressions involved would need to operate on full precision? + */ + if (var->data.mode == ir_var_temporary) + return true; + return var->data.precision == ast_precision_low || var->data.precision == ast_precision_medium; } -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev