glsl: treat lowp as mediump when lowering builtins
authorMarek Olšák <marek.olsak@amd.com>
Tue, 5 May 2020 01:52:09 +0000 (21:52 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Jun 2020 20:01:18 +0000 (20:01 +0000)
This seems to have been missed.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

src/compiler/glsl/lower_precision.cpp

index 332cd50cc7a6bf7191ef19a1c4c0cca4ccd5d788..9ba1efafa01c92f8aaa61d5fbea595d4d74888b8 100644 (file)
@@ -646,8 +646,10 @@ find_precision_visitor::visit_enter(ir_call *ir)
 
    if (!ir->callee->is_builtin() ||
        ir->return_deref == NULL ||
-       ir->return_deref->variable_referenced()->data.precision !=
-       GLSL_PRECISION_MEDIUM)
+       (ir->return_deref->variable_referenced()->data.precision !=
+        GLSL_PRECISION_MEDIUM &&
+        ir->return_deref->variable_referenced()->data.precision !=
+        GLSL_PRECISION_LOW))
       return visit_continue;
 
    ir->callee = map_builtin(ir->callee);